version: '3.8' services: shimmy: build: context: ../.. dockerfile: templates/docker/Dockerfile image: shimmy:latest container_name: shimmy-ai restart: unless-stopped ports: - "127.0.0.1:11435:11435" volumes: # Mount models directory - ./models:/app/models:ro # Cache directory for better performance - shimmy_cache:/app/cache # Optional: HuggingFace cache - huggingface_cache:/home/shimmy/.cache/huggingface environment: - SHIMMY_API_KEY=${SHIMMY_API_KEY:?Set SHIMMY_API_KEY to a random API credential first} - SHIMMY_HOST=0.0.0.0 - SHIMMY_PORT=11435 - RUST_LOG=info - SHIMMY_MODEL_PATHS=/app/models healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:11435/health"] interval: 30s timeout: 10s retries: 3 start_period: 30s # Resource limits deploy: resources: limits: memory: 8G cpus: '4' reservations: memory: 2G cpus: '1' # Optional: nginx reverse proxy for production nginx: image: nginx:alpine container_name: shimmy-proxy restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - ./ssl:/etc/nginx/ssl:ro depends_on: - shimmy profiles: - production volumes: shimmy_cache: driver: local huggingface_cache: driver: local networks: default: name: shimmy-network