VM ingress for directing traffic to other docker compose stacks
This project assumes that you have a freshly deployed VM in the cloud. Now that you have a VM with docker + compose, you might want to host several domains for applications and all in different docker compose stacks. This ingress allows you to expose multiple domains on a single virtual machine and then route traffic to each docker compose stack.
- Docker Compose to run the ingress
- Caddy to automatically generate SSL certificates for your domain(s)
- Branch Deploy workflow to help you ship changes to production (on your VM)
First, clone this repo to your virtual machine / vps. Then enter the directory of the repo you just cloned.
Now run the following command:
Note: Before you run this command, ensure that you have a DNS record pointed to the static IP of your VM. This is required for the SSL certificate to be generated by Caddy
script/deploy
This will deploy ingress
Once your project is fully setup, you will likely want to apply updates from the upstream repository of ingress. To do this, either wait for Dependabot to open a PR or open one yourself.
You can comment .deploy
on the pull request to branch-deploy and test out the update before fully "committing" to the change and merging the branch into main
curl -I -k https://localhost/health