⬆️ Automatic update agent for Docker-based GitHub-hosted applications on constrained networks.
87
This project provides an automatic update agent for Docker-based applications in restricted network environments. The agent periodically checks for new application versions and updates the running containers accordingly.
nke@alpine:~$ git clone https://github.com/nicokempe/docker-deploy-agent.git
nke@alpine:~$ cd docker-deploy-agent
nke@alpine:~$ npm install
.env file and add your GitHub credentials and repository information:GITHUB_TOKEN=your_github_personal_access_token
GITHUB_REPO_OWNER=repository_owner
GITHUB_REPO_NAME=repository_name
PACKAGE_NAME=your_package_name
CHECK_INTERVAL=900000
DOCKER_AGENT_IMAGE=your_repo_owner/your_repo_name
DOCKER_AGENT_TAG=your_tag
Don't forget to list the
.envfile in the.gitignoreto avoid accidentally committing it to your repository.
nke@alpine:~$ docker build -t your_repo_owner/your_repo_name:your_tag .
nke@alpine:~$ docker-compose up -d
The agent runs as a standalone Docker container and periodically checks for updates to your application. When an update is available, the agent performs a zero-touch deployment, updating the application to the latest version. If the update fails, the agent features a rollback function to revert to the previous version.
You can customize the agent to suit your specific requirements by modifying the configuration in the .env file and the code in the src files. Please make sure to thoroughly test any changes before deploying them in a production environment.
This project is licensed under the MIT License. For more information, see the LICENSE
Content type
Image
Digest
sha256:ca714d471…
Size
82 MB
Last updated
over 3 years ago
docker pull nicokempe/docker-deploy-agent:v2023.5.1-dev