services: backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" volumes: - ./backend/src:/app/src - ./backend/data:/app/data - ./backend/uploads:/app/uploads # Mount .env if needed, or rely on COPY in Dockerfile. # Mounting is better for dev/secrets, but COPY is better for self-contained. # We'll stick to the COPY in Dockerfile for now, but allow override via env_file. env_file: - ./backend/.env environment: - REDIS_URL=redis://redis:6379 - DATABASE_URL=postgresql://pixel:pixelpassword@postgres:5432/pixeldb depends_on: - redis - postgres restart: always redis: image: redis:6-alpine ports: - "63791:6379" restart: always postgres: image: postgres:15-alpine environment: POSTGRES_USER: pixel POSTGRES_PASSWORD: pixelpassword POSTGRES_DB: pixeldb ports: - "54321:5432" volumes: - postgres_data:/var/lib/postgresql/data restart: always frontend: build: context: ./frontend dockerfile: Dockerfile args: - API_URL=http://backend:8000 ports: - "3000:3000" environment: - API_URL=http://backend:8000 depends_on: - backend restart: always volumes: postgres_data: