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.
14 lines
383 B
Bash
14 lines
383 B
Bash
#!/bin/sh
|
|
# Carga METEOR_SETTINGS desde un fichero montado (secretos fuera de la imagen).
|
|
set -e
|
|
|
|
if [ -n "${METEOR_SETTINGS_FILE:-}" ]; then
|
|
if [ ! -r "$METEOR_SETTINGS_FILE" ]; then
|
|
echo "ERROR: METEOR_SETTINGS_FILE=$METEOR_SETTINGS_FILE no existe o no es legible" >&2
|
|
exit 1
|
|
fi
|
|
METEOR_SETTINGS="$(cat "$METEOR_SETTINGS_FILE")"
|
|
export METEOR_SETTINGS
|
|
fi
|
|
|
|
exec "$@"
|