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:
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Next.js Application (Production Mode)
|
||||
app:
|
||||
@@ -7,6 +5,8 @@ services:
|
||||
context: ./proto
|
||||
dockerfile: Dockerfile
|
||||
target: runner # Use runner stage for production (smaller size, no dev dependencies)
|
||||
args:
|
||||
- NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL:-https://mozdit.hu}
|
||||
container_name: mozdit-app-prod
|
||||
ports:
|
||||
- "8080:3000" # Host port 8080 elkerüli a lokális npm dev (3000) összeakadást
|
||||
|
||||
Reference in New Issue
Block a user