🔧 Fix zero-downtime deployment issues
- Fix Dockerfile standalone build path from /app/.next/standalone/gitea/portfolio to /app/.next/standalone/app - Fix nginx configuration by removing conflicting server blocks - Consolidate health check and main proxy into single server block - Ensure proper load balancing between portfolio-app-1 and portfolio-app-2 ✅ Deployment now working successfully with: - Application running on both instances (healthy) - Database and Redis running (healthy) - Nginx load balancer working - Health endpoints accessible - Main portfolio site accessible at http://localhost/
This commit is contained in:
@@ -9,18 +9,6 @@ http {
|
||||
server portfolio-app-2:3000 max_fails=3 fail_timeout=30s;
|
||||
}
|
||||
|
||||
# Health check endpoint
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location /health {
|
||||
access_log off;
|
||||
return 200 "healthy\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
|
||||
# Main server
|
||||
server {
|
||||
listen 80;
|
||||
@@ -42,6 +30,13 @@ http {
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 8 4k;
|
||||
|
||||
# Health check endpoint
|
||||
location /health {
|
||||
access_log off;
|
||||
return 200 "healthy\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
# Main location
|
||||
location / {
|
||||
proxy_pass http://portfolio_backend;
|
||||
|
||||
Reference in New Issue
Block a user