services: postgres: image: postgres:15-alpine container_name: qquiz_postgres environment: POSTGRES_USER: qquiz POSTGRES_PASSWORD: qquiz_password POSTGRES_DB: qquiz_db volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U qquiz"] interval: 10s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile container_name: qquiz_backend environment: - DATABASE_URL=postgresql+asyncpg://qquiz:qquiz_password@postgres:5432/qquiz_db env_file: - .env volumes: - ./backend:/app - upload_files:/app/uploads ports: - "8000:8000" depends_on: postgres: condition: service_healthy command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload frontend: build: context: ./frontend dockerfile: Dockerfile container_name: qquiz_frontend volumes: - ./frontend:/app - /app/node_modules ports: - "3000:3000" environment: - REACT_APP_API_URL=http://localhost:8000 depends_on: - backend command: npm start volumes: postgres_data: upload_files: