feat(deploy): add staging environment with dedicated docker compose
- 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:
@@ -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* ./
|
||||
|
||||
|
||||
Reference in New Issue
Block a user