Repository navigation
Expand file tree
/
Copy pathdocker-compose.demo.yml
More file actions
93 lines (86 loc) · 3.29 KB
/
Copy pathdocker-compose.demo.yml
File metadata and controls
93 lines (86 loc) · 3.29 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Demo mode — a fixed, realistic fake fleet for local visual QA / dev, and
# for the release screenshot pipeline (.github/workflows/screenshots.yml).
# Fully isolated from the production docker-compose.yml stack: its own
# project name/volumes/ports, and DEMO_MODE=true disables every poller that
# would otherwise make a real outbound network call (Proxmox VE, Nginx Proxy
# Manager, uptime/SSL probes, Git release tracking) — see server/CLAUDE.md and
# CONTRIBUTING.md's "Mode démo" section for the full local dev workflow.
#
# Reset: the cheapest reset is just re-running the seed binary — it's
# idempotent and brings every table back to its canonical demo state without
# touching the volume. For a hard reset (e.g. after manually deleting
# something via the UI):
# docker compose -f docker-compose.demo.yml down -v
# docker compose -f docker-compose.demo.yml up -d --build
# docker compose -f docker-compose.demo.yml exec server-demo /app/seed-demo
name: serversupervisor-demo
services:
postgres-demo:
image: timescale/timescaledb:2.27.2-pg16
restart: unless-stopped
command:
- "postgres"
- "-c"
- "shared_preload_libraries=timescaledb"
environment:
POSTGRES_USER: supervisor
POSTGRES_PASSWORD: supervisor
POSTGRES_DB: serversupervisor
ports:
# Published (unlike the production compose file) so "go run ./cmd/server"
# and "go run ./cmd/seed-demo" on the host can reach it directly — the
# fast local dev loop documented in CONTRIBUTING.md. Non-default port to
# avoid clashing with a real local Postgres.
- "55432:5432"
volumes:
- demo_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U supervisor -d serversupervisor"]
interval: 5s
timeout: 5s
retries: 10
# Full pre-built stack (server + frontend in one image, same as production)
# — used by the screenshots.yml CI workflow and for a final pre-release
# check locally. Day-to-day backend development should run
# "go run ./cmd/server" against postgres-demo instead (see CONTRIBUTING.md);
# rebuilding this image on every change is too slow for that loop.
server-demo:
build:
context: .
dockerfile: server/Dockerfile
restart: unless-stopped
ports:
- "8080:8080"
environment:
SERVER_PORT: "8080"
BASE_URL: http://localhost:8080
APP_ENV: dev
DEMO_MODE: "true"
TZ: UTC
DB_HOST: postgres-demo
DB_PORT: "5432"
DB_USER: supervisor
DB_PASSWORD: supervisor
DB_NAME: serversupervisor
DB_SSLMODE: disable
# Fixed, non-default, local-only credentials — avoids the
# must_change_password forced-reset screen (see main.go: it only
# triggers when ADMIN_PASSWORD is literally "admin").
ADMIN_USER: demo
ADMIN_PASSWORD: DemoPass123!
# No external integrations configured — belt-and-suspenders alongside
# the DEMO_MODE poller gate in main.go.
GITHUB_TOKEN: ""
NOTIFY_URL: ""
SMTP_HOST: ""
depends_on:
postgres-demo:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/api/health"]
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
volumes:
demo_postgres_data: