fase 3: stack docker-compose local del sistema modernizado
Compose con los 5 servicios: mongo:7 (replica set rs0 + mongo-init one-shot), redis (AOF), web Meteor 3.1 (Dockerfile multi-stage: builder debian con meteor-tool 3.1 -> server-deps alpine -> runtime node:22-alpine), notifications (dry-run) y node-red 4. Healthchecks (127.0.0.1, no localhost: busybox wget prefiere IPv6 y Meteor escucha IPv4), restart unless-stopped, logging rotado 3x10MB, secretos montados desde ./secrets (gitignored, solo .example versionado). .npmrc legacy-peer-deps para el ERESOLVE de las libs react viejas. Validado: los 5 servicios healthy y smoke REST byte-identico (12/12) contra la web dockerizada en :3200. RUNBOOK.md documenta arranque, smoke, backups y rollback. No toca infra de Comunes.
This commit is contained in:
parent
e3f3f4aa20
commit
197a59f641
10 changed files with 341 additions and 1 deletions
15
secrets/README.md
Normal file
15
secrets/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# secrets/ — secretos del stack local (docker-compose)
|
||||
|
||||
Los ficheros reales de este directorio están **gitignorados** — solo se
|
||||
versionan los `*.example`. Los valores de producción viven en el repo privado
|
||||
`tcef-private-config` / en shiva, nunca aquí.
|
||||
|
||||
Para la validación local:
|
||||
|
||||
```bash
|
||||
# settings de la web Meteor (el compose lo monta como fichero en el contenedor)
|
||||
cp ../settings-development.json meteor-settings.json
|
||||
|
||||
# entorno del microservicio de notificaciones (dry-run por defecto: no envía nada)
|
||||
cp notifications.env.example notifications.env
|
||||
```
|
||||
14
secrets/meteor-settings.json.example
Normal file
14
secrets/meteor-settings.json.example
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"gmaps": { "key": "GMAPS_BROWSER_KEY", "serverKey": "GMAPS_SERVER_KEY" },
|
||||
"public": {},
|
||||
"private": {
|
||||
"internalApiToken": "CAMBIA-ESTE-TOKEN (la API REST solo se registra si existe)",
|
||||
"testMailer": false,
|
||||
"debugMailer": false,
|
||||
"isMailServer": true,
|
||||
"fireIconUrl": "https://fuegos.comunes.org/fire-marker.png",
|
||||
"ironPassword": "IRON_PASSWORD",
|
||||
"cron": { "debug": false },
|
||||
"proxies_count": 0
|
||||
}
|
||||
}
|
||||
28
secrets/notifications.env.example
Normal file
28
secrets/notifications.env.example
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# tcef-notifications en el stack local (docker-compose). Copia a
|
||||
# notifications.env. Referencia completa: ../../tcef-notifications/.env.example
|
||||
#
|
||||
# SEGURO POR DEFECTO: MODE=dry-run no envía nada por ningún canal.
|
||||
|
||||
MODE=dry-run
|
||||
KILL_SWITCH=0
|
||||
OWNED_CHANNELS=fcm,email
|
||||
MATCHER_MODE=off
|
||||
|
||||
# Infra del compose (nombres de servicio de docker-compose.yml)
|
||||
MONGO_URL=mongodb://mongo:27017/fuegos?replicaSet=rs0
|
||||
MONGO_DB=fuegos
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
|
||||
POLL_INTERVAL_MS=10000
|
||||
POLL_BATCH_SIZE=500
|
||||
|
||||
# Solo necesarios en canary/full (el dry-run no construye los clientes):
|
||||
# FCM_SERVICE_ACCOUNT=/run/secrets/firebase-service-account.json
|
||||
# FCM_PROJECT_ID=angular-cosmos-108908
|
||||
# MAIL_URL=smtps://USER:PASS@smtp.host:465
|
||||
# IRON_PASSWORD=
|
||||
|
||||
ROOT_URL=http://localhost:3200/
|
||||
LOG_LEVEL=info
|
||||
SERVICE_NAME=tcef-notifications
|
||||
Loading…
Add table
Add a link
Reference in a new issue