- Python 3.12, Django 5.2, Wagtail 7
- PostgreSQL 17 (via Docker)
- AWS S3 for static and media files in production
- Gunicorn as the application server
- uv for dependency management
- Copy the example env and fill in values:
cp .env.example .envRequired variables:
DEBUG=True
PRODUCTION=False
SECRET_KEY=<a-long-random-string>
ALLOWED_HOSTS=localhost,127.0.0.1
DB_NAME=lazy_baker
DB_HOST=dbAWS credentials are only needed when PRODUCTION=True. Leave them out for local development.
- Start the containers:
docker compose up- On first run (or after restoring a database dump), run migrations and populate the search index:
docker compose exec web python manage.py migrate
docker compose exec web python manage.py update_index- Create a superuser to access the Wagtail admin:
docker compose exec web python manage.py createsuperuser# Run tests
docker compose exec web python manage.py test
# Open a Django shell
docker compose exec web python manage.py shell
# Rebuild containers after dependency changes
docker compose build- Wagtail admin: http://localhost:8000/admin/
- Django admin: http://localhost:8000/django-admin/
Set PRODUCTION=True in the environment. This enables:
- Static and media files served from AWS S3
- Database authentication via
DB_USER/DB_PASSWORD SECURE_PROXY_SSL_HEADERfor HTTPS behind a proxy
Additional env variables required in production:
PRODUCTION=True
DEBUG=False
DB_USER=...
DB_PASSWORD=...
AWS_STORAGE_BUCKET_NAME=...
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...After deploying, run:
python manage.py migrate
python manage.py update_index
python manage.py collectstatic --noinput