feat(deploy): add an isolated demo stand with synthetic seed and guarded reset

This commit is contained in:
shira committed 2026-10-09 14:46:18 +03:00
1 parent bd23c839fd
commit e1df4ff77c
26 files changed
+3292 -2

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
# Overlay of the isolated demonstration stand. Only deploy/scripts/demo.sh
# combines it with docker-compose.yml, under the dedicated demo project
# (DEMO_PROJECT, lincodex-demo by default); never apply it to the working
# stand. The demo stand holds synthetic data only.
services:
backend:
environment:
# A full test on the demo stand assigns an uncalibrated synthetic
# demonstration category, as the prepared attempts do.
ASSESSMENT_DEMO_CATEGORIES_ENABLED: "true"
labels:
org.lincodex.demo-mode: isolated
demo-seed:
build:
context: ../../backend
dockerfile: Dockerfile.demo-seed
profiles: ["demo-seed"]
environment:
DATABASE_URL: postgres://${POSTGRES_USER:?Set POSTGRES_USER}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:?Set POSTGRES_DB}?sslmode=disable
# The command checks the mode itself; demo.sh passes it only after its
# own guard.
DEMO_MODE: ${DEMO_MODE:-}
DEMO_ACCOUNT_PASSWORD: ${DEMO_ACCOUNT_PASSWORD:?Set DEMO_ACCOUNT_PASSWORD in the demo env file}
depends_on:
postgres:
condition: service_healthy
# The command reaches PostgreSQL only; it never joins the storage network.
networks:
- default
restart: "no"
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
deploy:
resources:
limits:
cpus: "1.0"
memory: 256M
# The label is set when a volume is created, so only volumes that this
# overlay created carry it; demo.sh refuses to discard a volume without it.
volumes:
postgres_data:
labels:
org.lincodex.demo-mode: isolated
seaweedfs_data:
labels:
org.lincodex.demo-mode: isolated
kafka_data:
labels:
org.lincodex.demo-mode: isolated