- Add hf_db_init sidecar that ensures the HarborForge database exists on every `compose up` (idempotent CREATE DATABASE IF NOT EXISTS), so the shared MySQL instance can host both hangmanlab and harborforge schemas without touching existing data. - Wire hf_backend's DATABASE_URL directly from compose env vars and gate it on hf_db_init completing successfully. - Add a mysqladmin-ping healthcheck on mysql so dependents can wait on service_healthy. - Drop dead Vite runtime envs from hf_frontend (build-time only) and make wizard CORS_ORIGINS configurable via HF_FRONTEND_HOST. - Seed .env.example with all variables the stack reads. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
981 B
Plaintext
33 lines
981 B
Plaintext
# --- HangmanLab backend / frontend ---
|
|
BACKEND_PORT=8000
|
|
FRONTEND_PORT=80
|
|
|
|
# --- MySQL (shared by hangmanlab-backend and HarborForge) ---
|
|
DB_PORT=3306
|
|
DB_NAME=hangmanlab
|
|
DB_USER=hangmanlab
|
|
DB_PASSWORD=change_me
|
|
MYSQL_ROOT_PASSWORD=change_me_root
|
|
|
|
# --- HarborForge ---
|
|
HF_BACKEND_PORT=8001
|
|
HF_FRONTEND_PORT=3000
|
|
HF_FRONTEND_DEV_MODE=0
|
|
HF_SECRET_KEY=change_me_in_production
|
|
HF_LOG_LEVEL=INFO
|
|
|
|
# Database name used by HarborForge (created automatically by hf_db_init on every up).
|
|
HF_DB_NAME=harborforge
|
|
|
|
# Browser-facing origin of the HarborForge frontend. Used as the AbstractWizard
|
|
# CORS allow-list. Must match the scheme/host/port the user types in their
|
|
# browser. Examples:
|
|
# http://localhost:3000
|
|
# https://harborforge.example.com
|
|
# Multiple origins can be comma-separated.
|
|
HF_FRONTEND_HOST=http://localhost:3000
|
|
|
|
# AbstractWizard SSH-tunnel port (server-side bind). The setup wizard in the
|
|
# browser will ask the user to enter the matching local port.
|
|
WIZARD_PORT=8080
|