- scope no-cache headers to non-static routes (restore immutable asset caching) - reset cached rejected MongoDB promise so retries can succeed - use last X-Forwarded-For entry in Content Editor rate limiter (anti-spoofing) - remove weak Mongo defaults from compose files (fail loudly on missing env) - move staging banner text to common.json content - read APP_PORT from env file in deploy.sh healthcheck - filter network noise from staging smoke console assertions Closes MITHOME-48, MITHOME-49, MITHOME-50, MITHOME-51, MITHOME-52, MITHOME-53, MITHOME-54
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
services:
|
|
# Next.js Application (Staging Mode)
|
|
app:
|
|
build:
|
|
context: ./proto
|
|
dockerfile: Dockerfile
|
|
target: runner
|
|
args:
|
|
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-https://stage.mozdit.hu}
|
|
- NEXT_PUBLIC_DEPLOY_ENV=staging
|
|
container_name: mozdit-app-staging
|
|
ports:
|
|
- "127.0.0.1:8081:3000" # Belső port — csak nginx-en keresztül elérhető
|
|
environment:
|
|
- NODE_ENV=production
|
|
# No fallback for MONGODB_URI: with root auth enabled on the Mongo container an
|
|
# unauthenticated default URI would silently break the app — fail loudly instead.
|
|
- MONGODB_URI=${MONGODB_URI}
|
|
- MONGODB_DB=${MONGODB_DB:-mozdit}
|
|
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-https://stage.mozdit.hu}
|
|
- NEXT_PUBLIC_DEPLOY_ENV=staging
|
|
- NEXT_PUBLIC_COMPANY_NAME=${NEXT_PUBLIC_COMPANY_NAME:-mozdIT Bt.}
|
|
- NEXT_PUBLIC_CONTACT_EMAIL=${NEXT_PUBLIC_CONTACT_EMAIL:-info@mozdit.hu}
|
|
- LOKI_HOST=${LOKI_HOST:-http://loki:3100}
|
|
depends_on:
|
|
- mongodb
|
|
networks:
|
|
- mozdit-network-staging
|
|
restart: always
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
# MongoDB Database (külön a prod-tól)
|
|
mongodb:
|
|
image: mongo:7.0
|
|
container_name: mozdit-mongodb-staging
|
|
ports:
|
|
- "127.0.0.1:27019:27017" # Belső port, nem ütközik a prod 27018-cal
|
|
environment:
|
|
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER:-admin}
|
|
# No weak default password: a missing value must fail the container loudly.
|
|
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
|
|
- MONGO_INITDB_DATABASE=mozdit
|
|
volumes:
|
|
- mongodb_data_staging:/data/db
|
|
networks:
|
|
- mozdit-network-staging
|
|
restart: always
|
|
|
|
volumes:
|
|
mongodb_data_staging:
|
|
driver: local
|
|
|
|
networks:
|
|
mozdit-network-staging:
|
|
driver: bridge
|