Deploy your docker compose application with github actions and without the need of an own container registry to your server. But please keep in mind that this is just an example how a deployment for docker compose could work. Please modify the workflow to your needs before using it.
- A public server with root access
- Docker installed on the server
- Correct configured Docker remote access with private key authentication
- Use the contents of this repo as base for your application
- Configure the USER, HOST, PORT and PRIVATE_KEY secrets in your github repository
- Set the name of your application in the docker-compose commands (-p argument) of your
deploy.sh
- Push your changes and the deployment should run automatically
- Use a proxy in front of your services and don't choose public ports from your docker-compose application (see https://github.com/szsascha/caddy-proxy)
- Consider to use an application specific proxy / gateway for load balancing or an further configuration/logging layer in front of your application and behind your public proxy, deployed by this docker compose
- Always create own Dockerfiles for each image used. Otherwise a redeploy can break other services.
- Always prefix your container names or use the -p argument of docker-compose
- Manage internal portranges for your applications so you'll not get any problems with two applications using the same port