- Introduced .dockerignore to exclude unnecessary files from Docker context. - Added .env.aio.example for minimal configuration of the AdventureLog All-in-One setup. - Updated .env.example to include optional SITE_URL and GUNICORN_WORKERS settings. - Enhanced deploy.sh script for improved deployment flexibility and backup options. - Updated docker-compose files to use PostGIS 16-3.5 and added health checks for services. - Created docker-compose.aio.yml for All-in-One deployment configuration. - Improved health checks and service dependencies in docker-compose.dev.yml and docker-compose.yml. - Added GitHub workflows for building and pushing Docker images, including smoke tests for AIO setup.
1.7 KiB
Installation with Caddy
Caddy is a modern HTTP reverse proxy. It automatically integrates with Let's Encrypt (or other certificate providers) to generate TLS certificates for your site.
As an example, if you want to add Caddy to your Docker compose configuration, add the following service to your docker-compose.yml:
services:
caddy:
image: docker.io/library/caddy:2
container_name: adventurelog-caddy
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./caddy:/etc/caddy
- caddy_data:/data
- caddy_config:/config
web: ...
server: ...
db: ...
volumes:
caddy_data:
caddy_config:
Since all ingress traffic to the AdventureLog containsers now travels through Caddy, we can also remove the external ports configuration from those containsers in the docker-compose.yml. Just delete this configuration:
web:
ports:
- "8015:3000"
server:
ports:
- "8016:80"
That's it for the Docker compose changes. Of course, there are other methods to run Caddy which are equally valid.
However, we also need to configure Caddy. For this, create a file ./caddy/Caddyfile in which you configure the requests which are proxied to the frontend and backend respectively and what domain Caddy should request a certificate for:
adventurelog.example.com {
@frontend {
not path /media* /admin* /static* /accounts*
}
reverse_proxy @frontend web:3000
reverse_proxy server:80
}
Once configured, you can start up the containsers:
docker compose up
Your AdventureLog should now be up and running.