Files
AdventureLog/docker/README.md
Sean Morley 7f6bf1390a Add Docker and environment configuration files for AdventureLog
- 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.
2026-06-06 18:54:25 -04:00

1.4 KiB

Docker images

All production images are built from a single Dockerfile with shared stages so frontend, backend, and AIO stay in sync.

Build commands (from repository root)

# Individual images
docker build -f docker/Dockerfile --target frontend -t adventurelog-frontend .
docker build -f docker/Dockerfile --target backend  -t adventurelog-backend .
docker build -f docker/Dockerfile --target aio     -t adventurelog-aio .

# All app images
docker buildx bake -f docker/docker-bake.hcl

Layout

Path Purpose
Dockerfile Multi-target build (frontend, backend, aio)
docker-bake.hcl Optional bake file for all targets
shared/ nginx, supervisord, and entrypoint scripts shared across images

Shared stages

  • frontend-build — pnpm install, Vite build, production prune (used by frontend and aio)
  • backend-builder — pip install with GDAL dev headers
  • backend-runtime — Django app, collectstatic, cron scripts (extended by backend and aio)

Image-specific layers only add nginx/supervisord configs, entrypoints, and (for AIO) Node + frontend artifacts.

Slimming

Build context exclusions live in the repository root .dockerignore. Never commit local backend/server/media/, .venv/, or staticfiles/ — they are mounted or generated at runtime.