staging: artefactos de despliegue dockerizado + neutralizacion de datos

- .meteorignore excluye scripts/ del bundle Meteor (mongosh usa global db); docker-compose.staging.yml (mongo7/redis/notif-shadow/mailhog); scripts/neutralize-contacts.mongo.js (contactos + cola de correo); secrets/*.staging.*.example
This commit is contained in:
vjrj 2026-07-23 10:46:09 +02:00
parent 1ef0012af9
commit 2e298f9ee5
5 changed files with 346 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{
"// AVISO": "Plantilla de STAGING (testfuegos.comunes.org). Copia a meteor-settings.staging.json y rellena los valores reales desde tcef-private-config/local/todos-contra-el-fuego-web/settings-staging.json. El fichero real está gitignorado.",
"PrerenderIO": {
"serviceUrl": "http://groucho.comunes.org:3000/render",
"token": "PRERENDER_TOKEN"
},
"gmaps": {
"key": "GMAPS_BROWSER_KEY",
"serverKey": "GMAPS_SERVER_KEY"
},
"piwik": {
"url": "https://piwik.comunes.org/piwik.php",
"site_id": 7
},
"sentryPrivateDSN": "",
"public": {
"sentryPublicDSN": ""
},
"private": {
"testEmail": "vjrj@ourproject.org",
"// mail": "STAGING: correo capturado por Mailhog del compose. testMailer=false para no emitir 4 correos de autoprueba al arrancar; debugMailer=true para loguear la cola.",
"testMailer": false,
"debugMailer": true,
"MAIL_URL": "smtp://mailhog:1025",
"isMailServer": true,
"fireIconUrl": "https://testfuegos.comunes.org/n-fire-marker.png",
"OAuth": {
"google": {
"clientId": "GOOGLE_OAUTH_CLIENT_ID",
"secret": "GOOGLE_OAUTH_SECRET",
"loginStyle": "popup"
}
},
"// fcm": "STAGING: sin fcmApiToken. El push lo gestiona tcef-notifications (en shadow, sin service account).",
"proxies_count": 1,
"ironPassword": "IRON_PASSWORD",
"internalApiToken": "INTERNAL_API_TOKEN",
"cron": {
"debug": false
},
"twitter": {
"es": { "enabled": false },
"en": { "enabled": false }
}
}
}

View file

@ -0,0 +1,40 @@
# tcef-notifications en STAGING (testfuegos.comunes.org). Copia a notifications.staging.env.
# Referencia completa: ../../tcef-notifications/.env.example
#
# CERO ENVÍOS A USUARIOS REALES:
# MODE=shadow → calcula decisiones y las loguea, NO envía (ver src/mode.ts decideSend)
# MATCHER_MODE=shadow→ el matcher computa candidatos a notificar, NO inserta/envía
# sin FCM_SERVICE_ACCOUNT → no se construye el cliente FCM (imposible enviar push)
# MAIL_URL=smtp://mailhog:1025 → cualquier correo se captura en Mailhog, nunca sale
# telegram FUERA de OWNED_CHANNELS → los bots reales ES/EN ni se tocan
MODE=shadow
KILL_SWITCH=0
OWNED_CHANNELS=fcm,email
MATCHER_MODE=shadow
LOG_LEVEL=debug
# Infra del compose de staging (nombres de servicio de docker-compose.staging.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
# Captura de correo (no un SMTP real). En shadow no se envía, pero se deja apuntando a Mailhog
# como red de seguridad si alguien sube el MODE por error.
MAIL_URL=smtp://mailhog:1025
MAIL_FROM=Todos contra el Fuego (STAGING) <no-reply@testfuegos.comunes.org>
# NO configurar en staging (dejar comentado): sin service account no hay push posible.
# FCM_SERVICE_ACCOUNT=/run/secrets/firebase-service-account.json
# FCM_PROJECT_ID=angular-cosmos-108908
# OBLIGATORIO si MATCHER_MODE != off: el matcher lo exige para sellar notification.sealed
# (createMatchContext falla al arrancar sin él, aun en shadow). = ironPassword de los settings.
IRON_PASSWORD=IRON_PASSWORD_DE_LOS_SETTINGS
ROOT_URL=https://testfuegos.comunes.org/
SERVICE_NAME=tcef-notifications-staging