version: '3.8'
services:
maple-proxy:
build:
context: .
dockerfile: Dockerfile
cache_from:
- maple-proxy:builder
- maple-proxy:latest
image: maple-proxy:latest
container_name: maple-proxy
ports:
- "${MAPLE_PORT:-8080}:8080"
environment:
- MAPLE_HOST=0.0.0.0
- MAPLE_PORT=8080
- MAPLE_BACKEND_URL=${MAPLE_BACKEND_URL:-https://enclave.trymaple.ai}
- MAPLE_DEBUG=${MAPLE_DEBUG:-false}
- MAPLE_ENABLE_CORS=${MAPLE_ENABLE_CORS:-true}
- MAPLE_REQUEST_TIMEOUT_SECS=${MAPLE_REQUEST_TIMEOUT_SECS:-300}
- MAPLE_STREAM_IDLE_TIMEOUT_SECS=${MAPLE_STREAM_IDLE_TIMEOUT_SECS:-300}
- RUST_LOG=${RUST_LOG:-info}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
deploy:
resources:
limits:
cpus: '2'
memory: 512M
reservations:
cpus: '0.5'
memory: 128M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- maple-network
networks:
maple-network:
driver: bridge