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:
vjrj 2026-07-15 01:01:07 +02:00
parent e3f3f4aa20
commit 197a59f641
10 changed files with 341 additions and 1 deletions

View file

@ -39,7 +39,9 @@ COPY --chown=node:node docker/web-entrypoint.sh /web-entrypoint.sh
RUN chmod +x /web-entrypoint.sh
USER node
EXPOSE 3000
# 127.0.0.1 (not localhost): busybox wget resolves localhost to ::1 first, but
# the Meteor server listens on IPv4 only -> the check would false-negative.
HEALTHCHECK --interval=30s --timeout=5s --start-period=90s --retries=5 \
CMD wget -qO /dev/null "http://localhost:${PORT}/" || exit 1
CMD wget -qO /dev/null "http://127.0.0.1:${PORT}/" || exit 1
ENTRYPOINT ["/web-entrypoint.sh"]
CMD ["node", "main.js"]