# Docker Compose for Linea AI Backend services: linea-ai-backend: build: . container_name: linea-crypto-ai-backend ports: - "3000:3000" environment: - NODE_ENV=production - PORT=3000 env_file: - .env volumes: - ./data:/app/data:ro - ./knowledge:/app/knowledge:ro restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"] interval: 30s timeout: 10s retries: 3 start_period: 40s networks: - linea-network # Optional: Add a reverse proxy for production nginx: image: nginx:alpine container_name: linea-nginx ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - linea-ai-backend restart: unless-stopped networks: - linea-network profiles: - production networks: linea-network: driver: bridge volumes: linea-data: driver: local