Spaces:
Running
Running
| # Cloud / VPS deployment compose file | |
| # Usage: docker compose -f docker-compose.cloud.yml up -d | |
| # | |
| # This compose file: | |
| # - Builds from source (no pre-built image required) | |
| # - Exposes the API publicly on port 3001 (0.0.0.0) | |
| # - Uses a named Docker volume for persistent SQLite storage | |
| # - Automatically restarts on crash / VPS reboot | |
| # - Runs the local catalog crawl + Elo ranking every 12 hours (no license needed) | |
| services: | |
| freellmapi: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| env_file: | |
| - .env | |
| environment: | |
| NODE_ENV: production | |
| PORT: 3001 | |
| HOST_BIND: "0.0.0.0" | |
| # Disables the upstream premium catalog sync and enables the local | |
| # crawler pipeline (fetcher.py β sync_freellmapi.py β rank_models.py) | |
| CATALOG_SYNC_DISABLED: "1" | |
| ports: | |
| # Exposed on all interfaces β place behind Nginx/Caddy for HTTPS | |
| - "0.0.0.0:3001:3001" | |
| volumes: | |
| - freellmapi-data:/app/server/data | |
| restart: unless-stopped | |
| healthcheck: | |
| test: | |
| [ | |
| "CMD", | |
| "node", | |
| "-e", | |
| "fetch('http://127.0.0.1:3001/api/ping').then((res) => { if (!res.ok) process.exit(1); }).catch(() => process.exit(1));" | |
| ] | |
| interval: 30s | |
| timeout: 5s | |
| start_period: 30s | |
| retries: 3 | |
| volumes: | |
| freellmapi-data: | |