version: '3.8' # Define networks for better service isolation networks: app-network: driver: bridge # Define volumes for persistent data volumes: logs: driver: local services: server: build: context: . dockerfile: Dockerfile ports: - "8001:8001" environment: - OPENPOKE_HOST=0.0.0.0 - OPENPOKE_PORT=8001 - OPENPOKE_CORS_ALLOW_ORIGINS=* - OPENPOKE_ENABLE_DOCS=${OPENPOKE_ENABLE_DOCS:-1} # Sensitive environment variables should be loaded from .env file - API_BASE_URL=${API_BASE_URL} - API_KEY=${API_KEY} - COMPOSIO_API_KEY=${COMPOSIO_API_KEY} - INTERACTION_AGENT_MODEL=${INTERACTION_AGENT_MODEL} - EXECUTION_AGENT_MODEL=${EXECUTION_AGENT_MODEL} - EXECUTION_SEARCH_AGENT_MODEL=${EXECUTION_SEARCH_AGENT_MODEL} - SUMMARIZER_MODEL=${SUMMARIZER_MODEL} - EMAIL_CLASSIFIER_MODEL=${EMAIL_CLASSIFIER_MODEL} restart: unless-stopped networks: - app-network volumes: - logs:/app/logs - ./server:/app/server:ro deploy: resources: limits: cpus: '0.50' memory: 512M reservations: cpus: '0.25' memory: 256M logging: driver: "json-file" options: max-size: "10m" max-file: "3" web: build: context: . dockerfile: Dockerfile.web ports: - "3000:3000" environment: - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8001} depends_on: - server restart: unless-stopped networks: - app-network volumes: - ./web:/app:ro deploy: resources: limits: cpus: '0.30' memory: 256M reservations: cpus: '0.15' memory: 128M logging: driver: "json-file" options: max-size: "10m" max-file: "3" # Optional: Add a reverse proxy (nginx) for production # nginx: # image: nginx:alpine # ports: # - "80:80" # - "443:443" # volumes: # - ./nginx.conf:/etc/nginx/nginx.conf # depends_on: # - web # restart: unless-stopped