feat(deploy): add staging environment with dedicated docker compose
CI — Test & Build / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI — Test & Build / 🏗️ Build Docker Image (push) Blocked by required conditions

- Add docker-compose.staging.yml (app on 127.0.0.1:8081, separate MongoDB
  on 127.0.0.1:27019, dedicated volume/network)
- deploy.sh: select compose file and port per environment
  (staging 8081, production 8080)
- Dockerfile: accept NEXT_PUBLIC_SITE_URL as build arg (inlined at build
  time for NEXT_PUBLIC_ vars); pass it in both compose files
- Add .env.staging.example and .env.production.example
This commit is contained in:
Do Siki
2026-08-17 13:07:51 +02:00
parent c37787251b
commit 35bf43798d
6 changed files with 118 additions and 7 deletions
+4
View File
@@ -4,6 +4,10 @@ FROM node:20-alpine AS builder
WORKDIR /app
# NEXT_PUBLIC_* vars are inlined at build time — must be passed as build args
ARG NEXT_PUBLIC_SITE_URL
ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL
# Copy package files
COPY package.json package-lock.json* ./