services: postgres: image: postgres:15.3-bullseye ports: - "5433:5432" environment: POSTGRES_USER: pythondotorg POSTGRES_PASSWORD: pythondotorg POSTGRES_DB: pythondotorg POSTGRES_HOST_AUTH_METHOD: trust # never do this in production! healthcheck: test: ["CMD", "pg_isready", "-U", "pythondotorg", "-d", "pythondotorg"] interval: 1s redis: image: redis:7-bullseye ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli","ping"] interval: 1s web: build: . image: pythondotorg:docker-compose command: uv run python manage.py runserver 0.0.0.0:8000 volumes: - .:/code ports: - "8000:8000" environment: DATABASE_URL: postgresql://pythondotorg:pythondotorg@postgres:5432/pythondotorg DJANGO_SETTINGS_MODULE: pydotorg.settings.local depends_on: postgres: condition: service_healthy redis: condition: service_healthy worker: image: pythondotorg:docker-compose command: uv run celery -A pydotorg worker -B -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler volumes: - .:/code environment: DATABASE_URL: postgresql://pythondotorg:pythondotorg@postgres:5432/pythondotorg DJANGO_SETTINGS_MODULE: pydotorg.settings.local depends_on: postgres: condition: service_healthy redis: condition: service_healthy