Deploy with Docker¶
This is the recommended way to run Eskoz. The Compose stack provides three services:
- db — PostgreSQL 16, with a persistent volume.
- web — the Django app served by Gunicorn (migrations,
collectstaticand translation compilation run automatically on start). - caddy — a reverse proxy that terminates TLS with automatic Let's Encrypt
certificates and serves
/staticand/mediadirectly.
Prerequisites¶
- Docker and Docker Compose installed
- A
.envfile at the project root (see Configuration) - For HTTPS: a domain whose DNS points at the host, plus
DOMAINandEMAILset
1. Build and start the stack¶
The web container's entrypoint waits for the database, applies migrations,
collects static files and compiles translations before launching Gunicorn — so
the first start may take a moment.
2. Create the first admin user¶
3. Update your config¶
Using the prebuilt image¶
Every release is automatically published to the GitHub Container Registry, so you don't have to build locally. Pull a tagged image:
To run it via Compose, replace the build: block of the web service with:
Common operations¶
| Task | Command |
|---|---|
| View logs | docker compose -f docker/docker-compose.yml logs -f web |
| Run migrations | docker compose -f docker/docker-compose.yml exec web python manage.py migrate |
| Open a Django shell | docker compose -f docker/docker-compose.yml exec web python manage.py shell |
| Stop the stack | docker compose -f docker/docker-compose.yml down |
Data persistence
Database, static and media files live in named Docker volumes
(postgres_data, static_volume, media_volume). down keeps them; add
-v only if you really want to delete your data.