{"id":29799774,"url":"https://github.com/oncloud125252/spidertrigger","last_synced_at":"2025-08-11T22:34:53.448Z","repository":{"id":192732990,"uuid":"687274822","full_name":"OnCloud125252/SpiderTrigger","owner":"OnCloud125252","description":"SpiderTrigger is a powerful tool designed to automate the process of deploying your applications on your own server, similar to platforms like Railway, Render, Vercel, Netlify, etc.","archived":false,"fork":false,"pushed_at":"2023-11-08T09:48:19.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-11-08T11:01:35.994Z","etag":null,"topics":["automation","deploy","deployment","docker","webhook"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OnCloud125252.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-05T02:50:08.000Z","updated_at":"2023-09-07T17:36:31.000Z","dependencies_parsed_at":"2023-11-08T10:45:14.663Z","dependency_job_id":"4d84991f-4099-47b8-aaa2-98a333b4a17f","html_url":"https://github.com/OnCloud125252/SpiderTrigger","commit_stats":null,"previous_names":["oncloud125252/autodeploy","oncloud125252/spidertrigger"],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/OnCloud125252/SpiderTrigger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnCloud125252%2FSpiderTrigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnCloud125252%2FSpiderTrigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnCloud125252%2FSpiderTrigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnCloud125252%2FSpiderTrigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnCloud125252","download_url":"https://codeload.github.com/OnCloud125252/SpiderTrigger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnCloud125252%2FSpiderTrigger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267482008,"owners_count":24094508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","deploy","deployment","docker","webhook"],"created_at":"2025-07-28T08:10:37.607Z","updated_at":"2025-07-28T08:11:37.296Z","avatar_url":"https://github.com/OnCloud125252.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpiderTrigger - Automated Deployment Tool\n\nSpiderTrigger is a powerful tool designed to automate the process of deploying your applications on your own server, similar to platforms like Railway, Render, Vercel, Netlify, etc.\n\n\u003e [!WARNING]\\\n\u003e SpiderTrigger currently supports Node.js applications and is compatible with Linux platforms. However, future updates may introduce support for additional programming languages, frameworks, and platforms.\n\n## When and Why You Need SpiderTrigger\n\nSpiderTrigger is essential when you want to streamline the deployment process of your applications on your own server. It eliminates the manual steps involved in pulling your project from GitHub, building a Docker container, and running the container. With SpiderTrigger, you can save time and effort by automating these tasks, allowing you to focus on developing your application.\n\n## Workflow Behind the Scenes\n\nThe workflow of SpiderTrigger is as follows:\n\n1. **User pushes changes to GitHub:**\n   Whenever you make changes to your codebase and push them to your GitHub repository, SpiderTrigger springs into action.\n\n2. **GitHub sends a request to the local webhook server:**\n   SpiderTrigger integrates seamlessly with GitHub's webhook functionality. Once you push changes, GitHub sends a request to your locally hosted webhook server.\n\n3. **The webhook server triggers a script:**\n   Upon receiving the webhook request, SpiderTrigger's script is automatically triggered. This script acts as the bridge between GitHub and your deployment process.\n\n4. **Automatic creation or update of Docker container:**\n   The script, powered by SpiderTrigger, initiates the creation of a new Docker container or updates the existing one. It pulls the latest changes from your GitHub repository, builds the Docker image, and runs the container with the updated code.\n\n# Set Up SpiderTrigger on Your Own Server\n## Prerequisites\n\nBefore deploying SpiderTrigger on your own server, make sure you have the following prerequisites installed:\n\n- Docker\n\nIf you're building SpiderTrigger from source, make sure you have the following prerequisites installed as well:\n\n- Go version 1.21.0 or later\n\n\u003cdetails\u003e\n   \u003csummary\u003eInstalling Docker\u003c/summary\u003e\n\nTo install Docker, follow these steps:\n\n1. Install Docker using the package manager for your operating system. For example, on Ubuntu, you can use the following command:\n   ```bash\n   sudo apt install docker.io\n   ```\n\n2. Fix the permission error by performing the following steps:\n   1. Create the `docker` group on the system:\n      ```bash\n      sudo groupadd -f docker\n      ```\n   2. Add the active user to the `docker` group:\n      ```bash\n      sudo usermod -aG docker $USER\n      ```\n   3. Apply the group changes to the current terminal session:\n      ```bash\n      newgrp docker\n      ```\n   4. Check if the `docker` group is in the list of user groups:\n      ```bash\n      groups\n      ```\n\nFor more information, please refer to this [Installing Portainer with Docker and Configuring MTU.md](https://gist.github.com/OnCloud125252/2346b1a03ce9d7fd378bfa26b083799f).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n   \u003csummary\u003eInstalling Go\u003c/summary\u003e\n\nTo install Go, follow these steps:\n\n1. Download the latest version of Go from the official website. For example, you can download Go 1.21.1 using the following command:\n\n   *Using wget*\n   ```bash\n   wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz\n   ```\n   *Using curl*\n   ```bash\n   curl -o go1.21.1.linux-amd64.tar.gz https://go.dev/dl/go1.21.1.linux-amd64.tar.gz\n   ```\n\n3. Remove any previous Go installation by deleting the `/usr/local/go` folder (if it exists):\n   ```bash\n   sudo rm -rf /usr/local/go\n   ```\n\n5. Extract the downloaded archive into `/usr/local`, creating a fresh Go tree. Run the following command (you may need to run it as root or through sudo):\n   ```bash\n   sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz\n   ```\n\n6. Add `/usr/local/go/bin` to the `PATH` environment variable. You can do this by adding the following line to your `$HOME/.profile` or `/etc/profile` (for a system-wide installation):\n   ```bash\n   echo '\\n# Golang\\nexport PATH=$PATH:/usr/local/go/bin' \u003e\u003e $HOME/.profile\n   ```\n\n7. Load the updated profile by running the following command:\n   ```bash\n   source $HOME/.profile\n   ```\n\n8. Verify that you've installed Go by opening a command prompt and typing the following command:\n   ```bash\n   go version\n   ```\n   Confirm that the command prints the installed version of Go.\n\nFor more information, please refer to the [official Go installation documentation](https://go.dev/doc/install).\n\n\u003c/details\u003e\n\n## Deploying SpiderTrigger\n\nThere are two methods available for deploying SpiderTrigger on your own server: [downloading the pre-built release](#Method-1-Downloading-the-Release) or [building it from source](#Method-2-Building-from-Source).\n\n### Method 1: Downloading the Release\n\n1. **Download the latest release:**\n   Visit the [releases page](https://github.com/OnCloud125252/SpiderTrigger/releases/latest) and download the latest release package for your operating system.\n\n2. **Extract the package:**\n   Extract the downloaded package to a directory of your choice on your server.  \n   \n   You can use the following command to extract the package into the home directory:\n   ```bash\n   unzip SpiderTrigger.zip -d ~\n   ```\n\n3. **Configure SpiderTrigger:**\n   Open the configuration file (`config.yaml`) included in the extracted package and customize the settings according to your requirements.  \n   \n   The configuration file should have the following structure:\n   ```yaml\n   port: 8000\n   path: /auto-deploy\n   ```\n\nYou may now navigate to the [Finishing](#finishing) part to complete the deployment.\n\n### Method 2: Building from Source\n\n1. **Clone the SpiderTrigger repository:**\n   Clone the SpiderTrigger repository from GitHub using the following command:\n   ```bash\n   git clone https://github.com/OnCloud125252/SpiderTrigger.git\n   ```\n\n2. **Navigate to the project directory:**\n   Change into the SpiderTrigger directory:\n   ```bash\n   cd SpiderTrigger\n   ```\n\n3. **Install the required dependencies:**\n   SpiderTrigger has a few dependencies that need to be installed before building.  \n   Install the dependencies by running the following command:\n   ```bash\n   go mod download\n   ```\n\n4. **Configure SpiderTrigger:**\n   Open the configuration file (`config.yaml`) and customize the settings according to your requirements.  \n   The configuration file should have the following structure:\n   ```yaml\n   port: 8000\n   path: /auto-deploy\n   ```\n\n5. **Build SpiderTrigger:**\n   Build the SpiderTrigger executable by running the build script:\n   ```bash\n   chmod +x ./go_build.sh\n   ./go_build.sh\n   ```\n   To build with a specific configuration file, use the following command:\n   ```bash\n   ./go_build.sh config.yaml\n   ```\n   It is recommended to use the build script because it can handle the dependencies correctly. If everything goes right, you will see a success message like below.  \n   ![image](https://user-images.githubusercontent.com/75195127/266393614-7858a1ea-1ada-4768-8cda-7407975dd6c7.png)\n\nYou may now navigate to the [Finishing](#finishing) part to complete the deployment.\n\n## Finishing\n\n1. **Set up a webhook in GitHub:**\n   1. Navigate to your GitHub repository's page.\n   2. Click on the \"Settings\" tab.\n   3. In the left sidebar, click on \"Webhooks\".\n   4. Click on the \"Add webhook\" button.\n   5. In the \"Payload URL\" field, enter the URL where SpiderTrigger is running, followed by the port and path you configured in the `config.yaml` file (e.g., `http://your-server-ip:8000/auto-deploy`).\n   6. Select the events that should trigger the webhook. For automatic deployments, you can choose the \"Push\" event.\n   7. Leave the other settings as their default values.\n   8. Click on the \"Add webhook\" button to save the webhook configuration.\n\n2. **Start SpiderTrigger:**\n   If you're building SpiderTrigger from source, you need to navigate to the `_production` directory first.\n   Run the executable file to start listening for webhook requests. It is recommended to use the `run_in_background.sh` script to run SpiderTrigger in the background.  \n   \n   To start SpiderTrigger in the background, use the following command:\n   ```bash\n   ./run_in_background.sh\n   ```\n   \n   To stop SpiderTrigger, you have two options:\n   - Use the `kill_run_in_background.sh` script by running the following command:\n     ```bash\n     ./kill_run_in_background.sh\n     ```\n   - Manually stop SpiderTrigger by killing the process using the stored PID. You can find the PID in the `nohup_pid` file.\n\nCongratulations! You have successfully deployed SpiderTrigger on your own server. SpiderTrigger will now listen for webhook requests and automatically perform the deployment process whenever changes are pushed to your configured path.\n\n## Additional Information\n- SpiderTrigger only exposes one port inside the Docker container (default 9000) to a random port on the host. You can check which port on the host is mapped to the container using the `docker ps` command.\n- SpiderTrigger automatically injects an environment variable to the Docker container: `PORT=9000`. If your application needs to use a port, you can directly use the `PORT` environment variable.\n- Once you have the webhook link, you can use the same webhook for many projects. SpiderTrigger will handle them separately on different containers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncloud125252%2Fspidertrigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foncloud125252%2Fspidertrigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foncloud125252%2Fspidertrigger/lists"}