{"id":16485204,"url":"https://github.com/mrspartak/swarmpit-ci-deploy","last_synced_at":"2026-04-10T03:01:16.768Z","repository":{"id":42919529,"uuid":"247112728","full_name":"mrspartak/swarmpit-ci-deploy","owner":"mrspartak","description":"Simple Swarmpit API tool to redeploy services by name using HTTP request","archived":false,"fork":false,"pushed_at":"2023-03-27T16:33:50.000Z","size":145,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T20:51:58.808Z","etag":null,"topics":["autodeploy","ci","deploy","deployment","deployment-automation","docker","docker-compose","docker-image","docker-swarm","dockerfile","github-actions","gitlab","gitlab-ci","swarm","swarmpit"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrspartak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-13T16:15:51.000Z","updated_at":"2025-05-17T08:27:45.000Z","dependencies_parsed_at":"2022-09-07T05:13:26.979Z","dependency_job_id":null,"html_url":"https://github.com/mrspartak/swarmpit-ci-deploy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrspartak/swarmpit-ci-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fswarmpit-ci-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fswarmpit-ci-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fswarmpit-ci-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fswarmpit-ci-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrspartak","download_url":"https://codeload.github.com/mrspartak/swarmpit-ci-deploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrspartak%2Fswarmpit-ci-deploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264831863,"owners_count":23670592,"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","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":["autodeploy","ci","deploy","deployment","deployment-automation","docker","docker-compose","docker-image","docker-swarm","dockerfile","github-actions","gitlab","gitlab-ci","swarm","swarmpit"],"created_at":"2024-10-11T13:24:37.424Z","updated_at":"2026-04-10T03:01:11.723Z","avatar_url":"https://github.com/mrspartak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple [Swarmpit](https://github.com/swarmpit/swarmpit) API tool to redeploy services by name\nI made this app because Swarmpit can't update services from private repositories, so I can use it in CI \"deploy\" stage via curl.\n\n[![Codacy Badge](https://img.shields.io/codacy/grade/0caa18d41856411481afd1c285dbd255?style=for-the-badge)](https://app.codacy.com/manual/assorium/swarmpit-ci-deploy)\n[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/assorium/swarmpit-ci-deploy?style=for-the-badge \"Docker Cloud Automated build\")](https://hub.docker.com/r/assorium/swarmpit-ci-deploy \"Docker Cloud Automated build\")\n[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/assorium/swarmpit-ci-deploy?style=for-the-badge \"Docker Cloud Build Status\")](https://hub.docker.com/r/assorium/swarmpit-ci-deploy \"Docker Cloud Build Status\")\n[![Docker Pulls](https://img.shields.io/docker/pulls/assorium/swarmpit-ci-deploy?style=for-the-badge \"Docker Pulls\")](https://hub.docker.com/r/assorium/swarmpit-ci-deploy \"Docker Pulls\")  \u003cbr/\u003e\n\n[![Latest Github tag](https://img.shields.io/github/v/tag/mrspartak/swarmpit-ci-deploy?sort=date\u0026style=for-the-badge \"Latest Github tag\")](https://github.com/mrspartak/swarmpit-ci-deploy/releases \"Latest Github tag\")\n\n## Environment variables\n    #port app will be launched at\n    const APP_PORT = process.env.APP_PORT || 3052\n    const APP_KEY = process.env.APP_KEY\n    key query to protect direct access\n    You can also pass key via APP_KEY_CONFIG or APP_KEY_SECRET (docker config or secret file)\n\n    #Debug\n    const DEBUG = process.env.DEBUG || false;\n\n    #Swarmpit settings\n    const SWARMPIT_URL = process.env.SWARMPIT_URL || 'http://127.0.0.1:888';\n\n    const SWARMPIT_AUTH = process.env.SWARMPIT_AUTH\n    this is Bearer token, it could be obtained in Swampit \u003e Profile Settings \u003e API Access\n    You can also pass this token via SWARMPIT_AUTH_CONFIG or SWARMPIT_AUTH_SECRET (docker config or secret file)\n\n## Docker\nyou can use config or secret file\n```\ndocker config create swarmpit_token \"Beared gihrogio...\" or you can just add local file with volume\n\ndocker run -p 3050:3050 --name swarmpit-ci-deploy \\\n  -e APP_KEY=123 -e SWARMPIT_AUTH_CONFIG=swarmpit_token \\\n  --config src=swarmpit_token,target=\"/home/app/tracker.txt\" \\\n  assorium/swarmpit-ci-deploy:latest\n```\n\n## Usage\nRedeployment. Service will try to download latest image and will restart.\n```\nGET /redeploy\n  query:\n    name: serviceName \n    id: id of service\n\nRETURNS JSON\n{success: Boolean, error?}\n\n//example\nGET /redeploy?key={key}\u0026name=frontend-app\n```\n\nExample with .gitlab-ci.yml  \n\"apk add --update curl \u0026\u0026 rm -rf /var/cache/apk/*\" you need this if you use docker:dind\n```yml\ndeploy:\n  stage: deploy\n  before_script:\n   - apk add --update curl \u0026\u0026 rm -rf /var/cache/apk/*\n  script:\n   - curl \"${DEPLOY_URL}/redeploy?key=${DEPLOY_KEY}\u0026name=${DEPLOY_NAME}\"\n  only:\n   - master\n```\nDEPLOY_URL - URL of this service, for example http://123.123.123.123:3052\nDEPLOY_KEY - IS AN APP_KEY variable\nDEPLOY_NAME - name of service you need to update\n\n## TODO\n* Of course I can implement webhook support. Write down an issue if you need this\n* Maybe other stuff, like upscale or downscale service by name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fswarmpit-ci-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrspartak%2Fswarmpit-ci-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrspartak%2Fswarmpit-ci-deploy/lists"}