services: postgres: image: postgres:16-alpine container_name: ollive-postgres-db restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: ollive ports: - "5433:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d ollive"] interval: 5s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile container_name: ollive-backend-api restart: always ports: - "8001:8000" environment: - DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/ollive - GEMINI_API_KEY=${GEMINI_API_KEY} - GROQ_API_KEY=${GROQ_API_KEY} depends_on: postgres: condition: service_healthy frontend: build: context: ./frontend dockerfile: Dockerfile container_name: ollive-frontend-ui restart: always ports: - "3000:3000" environment: - NEXT_PUBLIC_BACKEND_URL=http://localhost:8001 depends_on: - backend volumes: postgres_data: