Official Docker image builder for pretalx, a conference planning tool.
-
Clone this repository
git clone https://github.com/pretalx/pretalx-docker-image.git cd pretalx-docker-image -
Create environment file
cp .env.example .env
-
Edit
.envand set at minimum:POSTGRES_PASSWORD: A secure database passwordPRETALX_SECRET_KEY: A random secret key (generate withopenssl rand -base64 32)PRETALX_SITE_URL: Your site URL (e.g.,https://pretalx.example.com)
-
Start the services
docker compose up -d
-
Create a superuser
docker compose exec web python manage.py createsuperuser -
Access pretalx Open your browser to
http://localhost:8080
Pull the latest image from GitHub Container Registry:
docker pull ghcr.io/coscup/pretalx:latestRun web server:
docker run -d -p 8000:8000 \
-e POSTGRES_PASSWORD=secret \
-e PRETALX_SECRET_KEY=your-secret-key \
-e PRETALX_SITE_URL=http://localhost:8000 \
-v pretalx_data:/data \
-v pretalx_public:/public \
ghcr.io/coscup/pretalx:latest webSee .env.example for all available configuration options.
POSTGRES_PASSWORD: Database passwordPRETALX_SECRET_KEY: Django secret keyPRETALX_SITE_URL: Public URL of your instance
PRETALX_VERSION: pretalx version to build (tag or branch, default: main)PRETALX_IMAGE: Use pre-built image instead of building (optional)
GUNICORN_WORKERS: Number of worker processes (default: 4)GUNICORN_MAX_REQUESTS: Max requests per worker (default: 1200)GUNICORN_MAX_REQUESTS_JITTER: Request jitter (default: 50)GUNICORN_FORWARDED_ALLOW_IPS: Trusted proxy IPs (default: *)
pretalx_data: Application data and logspretalx_public: Static and media files (for reverse proxy)postgres_data: PostgreSQL databaseredis_data: Redis data
The Docker Compose setup includes:
- migrate: One-time migration service (runs before other services)
- web: Gunicorn WSGI server on port 8000
- worker: Celery background task worker
- db: PostgreSQL 15 database
- redis: Redis for caching and Celery
For production, use a reverse proxy (nginx, Traefik, Caddy) to:
- Serve static files from
/public/static/and/public/media/ - Provide HTTPS/SSL termination
- Handle load balancing if scaling web services
Example nginx configuration is available in reverse-proxy-examples/nginx/.
Scale web and worker services independently:
docker compose up -d --scale web=3 --scale worker=5Note: You'll need a load balancer in front when scaling web services.
# Build latest main branch
docker compose build
# Build specific version
docker compose build --build-arg PRETALX_VERSION=v2024.1.0docker build -t pretalx:custom \
--build-arg PRETALX_VERSION=main \
.# Create superuser
docker compose exec web python manage.py createsuperuser
# Django shell
docker compose exec web python manage.py shell
# Run migrations manually
docker compose exec web python manage.py migrate
# View logs
docker compose logs -f web
docker compose logs -f worker
# Rebuild frontend assets
docker compose exec web python manage.py rebuildImages are published to ghcr.io/coscup/pretalx:
latest: Latest stable build from pretalx main branchmain: Latest commit from pretalx main branchv*: Specific version releases (e.g.,v2024.1.0)
# Pull latest image
docker compose pull
# Restart services (migrations run automatically)
docker compose down
docker compose up -dThis repository:
- Clones the pretalx repository at the specified version
- Builds the Docker image with all dependencies
- Publishes to GitHub Container Registry via GitHub Actions
The build is triggered:
- Automatically when pretalx repository pushes to main
- On demand via workflow_dispatch
- On tags in this repository
This Docker configuration is licensed under the Apache License 2.0. pretalx itself is licensed under the Apache License 2.0.