mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-06-25 07:27:42 +00:00
Verified changes: - modify backend/.env.example - modify backend/src/api/auth.rs - modify backend/src/config/mod.rs - modify backend/src/rate_limit.rs - modify compose/.env.demo.example - modify compose/.env.production.example - modify compose/demo.yml - modify compose/production.yml - modify docs/admin/configuration.md - modify docs/admin/installation.md - modify docs/admin/opensuse-operator-kit.md - modify docs/admin/security.md - modify frontend/src/middleware.ts Diffstat: - 13 files changed, 243 insertions(+), 41 deletions(-)
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
# 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_BIND_HOST:-0.0.0.0}:${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}
|
|
TRUSTED_PROXY_IPS: ${TRUSTED_PROXY_IPS:-}
|
|
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-}
|
|
RATE_LIMIT_ENABLED: ${RATE_LIMIT_ENABLED:-true}
|
|
RATE_LIMIT_IP_RPM: ${RATE_LIMIT_IP_RPM:-300}
|
|
RATE_LIMIT_USER_RPM: ${RATE_LIMIT_USER_RPM:-1200}
|
|
RATE_LIMIT_AUTH_RPM: ${RATE_LIMIT_AUTH_RPM:-30}
|
|
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_BIND_HOST:-0.0.0.0}:${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:
|