version: "3.9" services: db: image: postgres:15-alpine container_name: geo_db restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres123 POSTGRES_DB: geo_platform ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d geo_platform"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: geo_redis restart: unless-stopped ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 backend: build: ./backend container_name: geo_backend restart: unless-stopped ports: - "8000:8000" env_file: - .env volumes: - ./backend:/app depends_on: db: condition: service_healthy redis: condition: service_healthy command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload frontend: build: ./frontend container_name: geo_frontend restart: unless-stopped ports: - "3000:3000" env_file: - .env volumes: - ./frontend:/app - /app/node_modules depends_on: - backend command: npm run dev volumes: postgres_data: redis_data: