Having everything happen automatically was a key goal of this project, even down to things like deploying server instances, registering DNS entries, and creating/renewing HTTPS certificates. This was accomplished in part by the companion project to this one.
https://github.com/drakumus/DigitalOceanDropletTerraform
- Build, tag, and upload a Docker image based off of Nginx, but with the website src added
- Connect to the remote DigitalOcean server with auto-provisioned ssh keys
- Upload
docker-compose.ymlandinit-letsencrypt.sh - Init certbot on first launch, or do nothing
- Deploy Docker Compose services (website and certbot)
rebuilds and executes as a detached instance of the docker container
docker compose up --build -d