services: db: image: postgres:15-alpine container_name: sportstime-db restart: unless-stopped volumes: - postgres_data:/var/lib/postgresql/data environment: POSTGRES_DB: sportstime POSTGRES_USER: sportstime POSTGRES_PASSWORD: ${DB_PASSWORD:-devpassword} healthcheck: test: ["CMD-SHELL", "pg_isready -U sportstime -d sportstime"] interval: 10s timeout: 5s retries: 5 networks: - sportstime redis: image: redis:7-alpine container_name: sportstime-redis restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 networks: - sportstime web: build: . container_name: sportstime-web restart: unless-stopped volumes: - .:/app - ./output:/app/output:ro ports: - "8842:8000" environment: - DEBUG=True - SECRET_KEY=dev-secret-key-not-for-production - ALLOWED_HOSTS=localhost,127.0.0.1,10.3.3.11 - SESSION_COOKIE_SECURE=False - CSRF_COOKIE_SECURE=False - DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime - REDIS_URL=redis://redis:6379/0 - POSTGRES_HOST=db - POSTGRES_PORT=5432 - DJANGO_SUPERUSER_USERNAME=admin - DJANGO_SUPERUSER_PASSWORD=admin - DJANGO_SUPERUSER_EMAIL=admin@localhost - IMPORT_INITIAL_DATA=true depends_on: db: condition: service_healthy redis: condition: service_healthy networks: - sportstime celery-worker: build: . container_name: sportstime-celery-worker restart: unless-stopped volumes: - .:/app environment: - DEBUG=True - SECRET_KEY=dev-secret-key-not-for-production - DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime - REDIS_URL=redis://redis:6379/0 - POSTGRES_HOST=db - POSTGRES_PORT=5432 entrypoint: [] depends_on: db: condition: service_healthy redis: condition: service_healthy networks: - sportstime command: celery -A sportstime worker -l INFO --concurrency=2 celery-beat: build: . container_name: sportstime-celery-beat restart: unless-stopped environment: - DEBUG=True - SECRET_KEY=dev-secret-key-not-for-production - DATABASE_URL=postgresql://sportstime:${DB_PASSWORD:-devpassword}@db:5432/sportstime - REDIS_URL=redis://redis:6379/0 - POSTGRES_HOST=db - POSTGRES_PORT=5432 entrypoint: [] depends_on: db: condition: service_healthy redis: condition: service_healthy networks: - sportstime command: celery -A sportstime beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler volumes: postgres_data: networks: sportstime: driver: bridge