Fix db, keyclaok .env.example e docker compose

This commit is contained in:
Lorenzo Sanesi
2026-07-25 12:10:54 +02:00
parent 5b7c82d359
commit 7cd0a1ff1b
7 changed files with 198 additions and 34 deletions
+28 -13
View File
@@ -2,26 +2,41 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
# Database di scouthub-attivita-be. Sulla stessa istanza vivono anche
# scouthub_home / scouthub_magazzino / scouthub_eventi (creati da db-init/
# al primo avvio), usati rispettivamente da home-backend/magazzino-backend/
# eventi-backend con le stesse credenziali POSTGRES_USER/POSTGRES_PASSWORD.
POSTGRES_DB=scouthub
POSTGRES_PORT=5432
ATTIVITA_BACKEND_PORT=8080
# Deve restare 8080: il frontend Angular ha l'URL dell'API hardcoded
# in src/environments/environment.ts (apiUrl: 'http://localhost:8080')
ATTIVITA_FRONTEND_PORT=4200
KEYCLOAK_DB_PASSWORD=keycloak_change_me
KEYCLOAK_ADMIN_PASSWORD=admin_change_me
# Se in locale esegui anche scouthub-home-be fuori da Docker (npm run dev),
# il suo PORT di default (8082) è già scelto per non collidere con questo.
KEYCLOAK_PORT=8081
# Keycloak ha una porta tutta sua, separata dai range frontend/backend qui sotto.
KEYCLOAK_PORT=6999
# Deve restare 8082: scouthub-home-fe ha l'URL dell'org-service hardcoded
# in src/environments/environment.ts (orgServiceApiBaseUrl: 'http://localhost:8082')
HOME_BACKEND_PORT=8082
HOME_FRONTEND_PORT=4201
# Porte frontend, a partire da 7000, in ordine home/attivita/magazzino/calendario.
# Nessuna e' hardcoded nel codice: i frontend Angular ricevono gli URL (Keycloak,
# API, cross-frontend) come build ARG Docker valorizzati da queste variabili
# (vedi build.args dei rispettivi servizi in docker-compose.yml).
HOME_FRONTEND_PORT=7000
ATTIVITA_FRONTEND_PORT=7001
MAGAZZINO_FRONTEND_PORT=7002
EVENTI_FRONTEND_PORT=7003
# Porte backend, a partire da 8000, stesso ordine home/attivita/magazzino/calendario.
HOME_BACKEND_PORT=8000
ATTIVITA_BACKEND_PORT=8001
MAGAZZINO_BACKEND_PORT=8002
EVENTI_BACKEND_PORT=8003
# Deve coincidere con il secret del client "scouthub-home-be" in keycloak/realm-export.json
KEYCLOAK_ORG_SERVICE_CLIENT_SECRET=change_me
# Deve coincidere con il secret del client "scouthub-magazzino-be" in keycloak/realm-export.json
KEYCLOAK_MAGAZZINO_CLIENT_SECRET=change_me
# Deve coincidere con il secret del client "scouthub-eventi-be" in keycloak/realm-export.json
# (secret condiviso anche con scouthub-attivita-be e scouthub-magazzino-be, che lo usano per
# chiamare POST /eventi/:id/risorse su scouthub-eventi-be)
KEYCLOAK_EVENTI_CLIENT_SECRET=change_me