version: '3.8' services: postgres: image: postgres:15-alpine container_name: order-orchestrator-postgres environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: order_orchestrator ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: order-orchestrator-redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile container_name: order-orchestrator-backend environment: - APP_ENV=development - DEBUG=true - POSTGRES_SERVER=postgres - POSTGRES_PORT=5432 - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=order_orchestrator - DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/order_orchestrator - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_URL=redis://redis:6379/0 - SECRET_KEY=your-secret-key-change-in-production - ALGORITHM=HS256 - ACCESS_TOKEN_EXPIRE_MINUTES=30 - FRONTEND_URL=http://localhost:5173 - VITE_API_URL=http://localhost:8000/api/v1 - VITE_WS_URL=ws://localhost:8000 ports: - "8000:8000" volumes: - ./backend/app:/app/app depends_on: postgres: condition: service_healthy redis: condition: service_healthy command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload frontend: build: context: ./frontend dockerfile: Dockerfile container_name: order-orchestrator-frontend environment: - VITE_API_URL=http://localhost:8000/api/v1 - VITE_WS_URL=ws://localhost:8000 ports: - "5173:5173" volumes: - ./frontend/src:/app/src - ./frontend/index.html:/app/index.html - ./frontend/package.json:/app/package.json - ./frontend/vite.config.ts:/app/vite.config.ts - ./frontend/tailwind.config.js:/app/tailwind.config.js - ./frontend/tsconfig.json:/app/tsconfig.json - ./frontend/tsconfig.node.json:/app/tsconfig.node.json depends_on: - backend volumes: postgres_data: redis_data: