likwid/compose/production.yml
Marco Allegretti a61ec18913 backend, compose, docs, +1: modify 13 files
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(-)
2026-02-24 19:45:42 +01:00

67 lines
1.9 KiB
YAML

# Production deployment - clean instance without demo data
# Usage: podman compose -f compose/production.yml up -d
services:
postgres:
image: postgres:16
container_name: likwid-prod-db
restart: unless-stopped
ports:
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-likwid}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-likwid_prod}
volumes:
- likwid_prod_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-likwid}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ../backend
dockerfile: Dockerfile
args:
INCLUDE_DEMO_SEED: "false"
container_name: likwid-prod-backend
restart: unless-stopped
ports:
- "${BACKEND_PORT:-3000}:3000"
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-likwid}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-likwid_prod}
JWT_SECRET: ${JWT_SECRET}
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: "false"
RUST_LOG: info
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: ../frontend
dockerfile: Dockerfile
args:
API_BASE: ${API_BASE:-http://localhost:3000}
container_name: likwid-prod-frontend
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-4321}:4321"
environment:
INTERNAL_API_BASE: http://backend:3000
API_BASE: ${API_BASE:-http://localhost:3000}
depends_on:
- backend
volumes:
likwid_prod_data: