diff --git a/compose/demo.yml b/compose/demo.yml index bd036b4..54bc7fd 100644 --- a/compose/demo.yml +++ b/compose/demo.yml @@ -1,65 +1,63 @@ -version: "3.9" - -# Demo deployment - includes demo users, seed data, and restricted actions -# Usage: podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d -# Reset: podman-compose --env-file compose/.env.demo -f compose/demo.yml down -v; podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d - -services: - postgres: - image: postgres:16 - container_name: likwid-demo-db - restart: unless-stopped - ports: - - "${DB_PORT:-5433}:5432" - environment: - POSTGRES_USER: ${POSTGRES_USER:-likwid_demo} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-demo_secret_change_me} - POSTGRES_DB: ${POSTGRES_DB:-likwid_demo} - volumes: - - likwid_demo_data:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-likwid_demo}"] - interval: 10s - timeout: 5s - retries: 5 - - backend: - build: - context: ../backend - dockerfile: Dockerfile - args: - INCLUDE_DEMO_SEED: "true" - container_name: likwid-demo-backend - restart: unless-stopped - ports: - - "${BACKEND_PORT:-3001}:3000" - environment: - DATABASE_URL: postgres://${POSTGRES_USER:-likwid_demo}:${POSTGRES_PASSWORD:-demo_secret_change_me}@postgres:5432/${POSTGRES_DB:-likwid_demo} - JWT_SECRET: ${JWT_SECRET:-demo_jwt_secret_not_for_production} - SERVER_HOST: 0.0.0.0 - SERVER_PORT: 3000 - DEMO_MODE: "true" - RUST_LOG: info - depends_on: - postgres: - condition: service_healthy - - frontend: - build: - context: ../frontend - dockerfile: Dockerfile - args: - API_BASE: ${API_BASE:-http://localhost:3001} - container_name: likwid-demo-frontend - restart: unless-stopped - ports: - - "${FRONTEND_PORT:-4322}:4321" - environment: - INTERNAL_API_BASE: http://backend:3000 - API_BASE: ${API_BASE:-http://localhost:3001} - PUBLIC_DEMO_SITE: ${PUBLIC_DEMO_SITE:-false} - depends_on: - - backend - -volumes: - likwid_demo_data: +version: "3.9" + +# Demo deployment - includes demo users, seed data, and restricted actions +# Usage: podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d +# Reset: podman-compose --env-file compose/.env.demo -f compose/demo.yml down -v; podman-compose --env-file compose/.env.demo -f compose/demo.yml up -d + +services: + postgres: + image: postgres:16 + container_name: likwid-demo-db + restart: unless-stopped + environment: + POSTGRES_USER: ${POSTGRES_USER:-likwid_demo} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-demo_secret_change_me} + POSTGRES_DB: ${POSTGRES_DB:-likwid_demo} + volumes: + - likwid_demo_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-likwid_demo}"] + interval: 10s + timeout: 5s + retries: 5 + + backend: + build: + context: ../backend + dockerfile: Dockerfile + args: + INCLUDE_DEMO_SEED: "true" + container_name: likwid-demo-backend + restart: unless-stopped + ports: + - "${BACKEND_PORT:-3001}:3000" + environment: + DATABASE_URL: postgres://${POSTGRES_USER:-likwid_demo}:${POSTGRES_PASSWORD:-demo_secret_change_me}@postgres:5432/${POSTGRES_DB:-likwid_demo} + JWT_SECRET: ${JWT_SECRET:-demo_jwt_secret_not_for_production} + SERVER_HOST: 0.0.0.0 + SERVER_PORT: 3000 + DEMO_MODE: "true" + RUST_LOG: info + depends_on: + postgres: + condition: service_healthy + + frontend: + build: + context: ../frontend + dockerfile: Dockerfile + args: + API_BASE: ${API_BASE:-http://localhost:3001} + container_name: likwid-demo-frontend + restart: unless-stopped + ports: + - "${FRONTEND_PORT:-4322}:4321" + environment: + INTERNAL_API_BASE: http://backend:3000 + API_BASE: ${API_BASE:-http://localhost:3001} + PUBLIC_DEMO_SITE: ${PUBLIC_DEMO_SITE:-false} + depends_on: + - backend + +volumes: + likwid_demo_data: