Update staging configuration to avoid port conflicts and enhance deployment scripts

- Changed staging app port from 3001 to 3002 in docker-compose.staging.yml
- Updated PostgreSQL port from 5433 to 5434 and Redis port from 6380 to 6381
- Modified STAGING_SETUP.md to reflect new port configurations
- Adjusted CI/CD workflows to accommodate new staging ports and improve deployment messages
- Added N8N environment variables to staging configuration for better integration
This commit is contained in:
2026-01-09 12:41:41 +01:00
parent de0f3f1e66
commit db0bf2b0c6
6 changed files with 357 additions and 69 deletions

View File

@@ -2,15 +2,13 @@
# Deploys automatically on dev/main branch
# Uses different ports and container names to avoid conflicts with production
version: '3.8'
services:
portfolio-staging:
image: portfolio-app:staging
container_name: portfolio-app-staging
restart: unless-stopped
ports:
- "3001:3000" # Different port from production (3000)
- "3002:3000" # Different port from production (3000) - using 3002 to avoid conflicts
environment:
- NODE_ENV=staging
- DATABASE_URL=postgresql://portfolio_user:portfolio_staging_pass@postgres-staging:5432/portfolio_staging_db?schema=public
@@ -22,9 +20,8 @@ services:
- MY_INFO_PASSWORD=${MY_INFO_PASSWORD}
- ADMIN_BASIC_AUTH=${ADMIN_BASIC_AUTH:-admin:staging_password}
- LOG_LEVEL=debug
- N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-https://n8n.dk0.dev}
- N8N_API_KEY=${N8N_API_KEY}
- N8N_SECRET_TOKEN=${N8N_SECRET_TOKEN}
- N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-}
- N8N_SECRET_TOKEN=${N8N_SECRET_TOKEN:-}
volumes:
- portfolio_staging_data:/app/.next/cache
networks:
@@ -62,7 +59,7 @@ services:
networks:
- portfolio_staging_net
ports:
- "5433:5432" # Different port from production (5432)
- "5434:5432" # Different port from production (5432) - using 5434 to avoid conflicts
healthcheck:
test: ["CMD-SHELL", "pg_isready -U portfolio_user -d portfolio_staging_db"]
interval: 10s
@@ -88,7 +85,7 @@ services:
networks:
- portfolio_staging_net
ports:
- "6380:6379" # Different port from production (6379)
- "6381:6379" # Different port from production (6379) - using 6381 to avoid conflicts
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s