compose: standardize demo/production env usage

This commit is contained in:
Marco Allegretti 2026-01-29 00:40:11 +01:00
parent 9fb576fc2c
commit 180fe5f05d
5 changed files with 13 additions and 5 deletions

View file

@ -14,6 +14,7 @@ BACKEND_PORT=3001
# Frontend
FRONTEND_PORT=4322
API_BASE=http://localhost:3001
INTERNAL_API_BASE=http://backend:3000
# Demo mode is always enabled for this deployment
# This enables:

View file

@ -14,5 +14,6 @@ BACKEND_PORT=3000
# Frontend
FRONTEND_PORT=4321
API_BASE=https://your-domain.com
INTERNAL_API_BASE=http://backend:3000
# Note: DEMO_MODE is always false for production

View file

@ -1,8 +1,8 @@
version: "3.9"
# Demo deployment - includes demo users, seed data, and restricted actions
# Usage: podman-compose -f compose/demo.yml up -d
# Reset: podman-compose -f compose/demo.yml down -v && podman-compose -f compose/demo.yml up -d
# 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:
@ -27,6 +27,8 @@ services:
build:
context: ../backend
dockerfile: Dockerfile
args:
INCLUDE_DEMO_SEED: "true"
container_name: likwid-demo-backend
restart: unless-stopped
ports:
@ -53,6 +55,7 @@ services:
ports:
- "${FRONTEND_PORT:-4322}:4321"
environment:
INTERNAL_API_BASE: http://backend:3000
API_BASE: ${API_BASE:-http://localhost:3001}
depends_on:
- backend

View file

@ -7,9 +7,9 @@ services:
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER:-likwid}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-likwid}
POSTGRES_DB: ${POSTGRES_DB:-likwid}
volumes:
- pgdata:/var/lib/postgresql/data

View file

@ -26,6 +26,8 @@ services:
build:
context: ../backend
dockerfile: Dockerfile
args:
INCLUDE_DEMO_SEED: "false"
container_name: likwid-prod-backend
restart: unless-stopped
ports:
@ -52,6 +54,7 @@ services:
ports:
- "${FRONTEND_PORT:-4321}:4321"
environment:
INTERNAL_API_BASE: http://backend:3000
API_BASE: ${API_BASE:-http://localhost:3000}
depends_on:
- backend