-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
57 lines (53 loc) · 2.66 KB
/
docker-compose.prod.yml
File metadata and controls
57 lines (53 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ═══════════════════════════════════════════════════════════════════════════
# Production Docker Compose — Thesis IoT Visual Monitoring
#
# Deploy with: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# Differences from dev compose:
# - Uses GHCR images instead of local builds
# - Adds Watchtower for automatic container updates
# - Mounts firmware volume for OTA binary storage
# - No hot-reload volume mounts
# ═══════════════════════════════════════════════════════════════════════════
services:
# ── Override server to use GHCR image ────────────────
server:
image: ${SERVER_IMAGE:-ghcr.io/whitehatd/thesis-server:latest}
build: !reset null
volumes: !override
- server_data:/app/data
- firmware_data:/app/data/firmware
environment:
- MQTT_BROKER_HOST=mosquitto
- MQTT_BROKER_PORT=1883
- DATABASE_URL=sqlite+aiosqlite:///./data/thesis.db
- VLLM_BASE_URL=http://host.docker.internal:8001/v1
- FIRMWARE_DIR=/app/data/firmware
- FIRMWARE_UPLOAD_TOKEN=${FIRMWARE_UPLOAD_TOKEN:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- CLAUDE_SONNET_MODEL=${CLAUDE_SONNET_MODEL:-claude-sonnet-4-6}
- CLAUDE_HAIKU_MODEL=${CLAUDE_HAIKU_MODEL:-claude-haiku-4-5-20251001}
- TZ=Europe/Brussels
# ── Override dashboard to use GHCR image ─────────────
dashboard:
image: ${DASHBOARD_IMAGE:-ghcr.io/whitehatd/thesis-dashboard:latest}
build: !reset null
# ── Watchtower — Auto-update containers ──────────────
#
# Polls GHCR every 5 minutes for new images.
# When a new image is detected, pulls it and restarts the container.
# This is the "git push → auto-deploy" mechanism.
watchtower:
image: nickfedor/watchtower:latest # containrrr/watchtower is EOL; nickfedor fork supports Docker API ≥1.40
container_name: thesis-watchtower
environment:
- WATCHTOWER_POLL_INTERVAL=300 # Check every 5 minutes
- WATCHTOWER_CLEANUP=true # Remove old images
- WATCHTOWER_INCLUDE_RESTARTING=true
- WATCHTOWER_LABEL_ENABLE=false # Watch ALL containers
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DOCKER_CONFIG:-~/.docker}/config.json:/config.json:ro
restart: unless-stopped
volumes:
firmware_data: