version: '3.8' services: frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: - REACT_APP_API_URL=http://localhost:8000 volumes: - ./frontend:/app - /app/node_modules depends_on: - backend backend: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: - DATABASE_URL=postgresql://whoosh:password@postgres:5432/whoosh_db - SECRET_KEY=your-secret-key-change-in-production - CORS_ORIGINS=http://localhost:3000 volumes: - ./backend:/app depends_on: - postgres - redis postgres: image: postgres:15 environment: - POSTGRES_USER=whoosh - POSTGRES_PASSWORD=password - POSTGRES_DB=whoosh_db ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./database/init.sql:/docker-entrypoint-initdb.d/init.sql redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data nginx: image: nginx:alpine ports: - "80:80" volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf depends_on: - frontend - backend volumes: postgres_data: redis_data: