microclimate-x / docker-compose.yml
W1nd5pac's picture
Deploy 2026-05-20T06:52:08Z — 11e81c5
4eefabb verified
raw
history blame contribute delete
814 Bytes
services:
api:
build:
context: .
dockerfile: Dockerfile
image: microclimate-x:latest
container_name: microclimate-x
restart: unless-stopped
ports:
- "8000:8000"
environment:
# Override Dockerfile default (/tmp, HF-Spaces-friendly) with the named
# volume so cache.sqlite3 survives container restarts on self-hosting.
- MICROCLIMATEX_DB=/data/cache.sqlite3
- MICROCLIMATEX_GIT_REV=${MICROCLIMATEX_GIT_REV:-docker}
volumes:
- mcx-data:/data
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0) if urllib.request.urlopen('http://localhost:8000/api/health',timeout=2).status==200 else sys.exit(1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
mcx-data: