fix: align backend port to 3000 across all configurations

The production docker-compose used port 3000 internally but nginx.conf
was hardcoded to port 3001, causing 502 errors on the root path (/).

Changes:
- Update nginx.conf to use backend:3000
- Update docker-compose.yml to use PORT=3000 for consistency
- Update port mapping and healthcheck to use port 3000
This commit is contained in:
Paul Nothaft
2026-01-08 15:28:35 +01:00
parent ebb2ce6065
commit 3a8d53f492
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ services:
restart: unless-stopped
environment:
- NODE_ENV=${NODE_ENV:-production}
- PORT=3001
- PORT=3000
- JWT_SECRET=${JWT_SECRET}
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
- ADMIN_EMAIL=${ADMIN_EMAIL:[email protected]}
@@ -43,12 +43,12 @@ services:
- ./backup:/backup
- ./storage:/app/storage
ports:
- "${BACKEND_PORT:-3001}:3001"
- "${BACKEND_PORT:-3001}:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:3001/health"]
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:3000/health"]
interval: 30s
timeout: 10s
retries: 3
+5 -5
View File
@@ -43,7 +43,7 @@ server {
# API proxy
location /api {
proxy_pass http://backend:3001;
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@@ -61,7 +61,7 @@ server {
# Photo serving proxy
location /photos {
proxy_pass http://backend:3001;
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -75,7 +75,7 @@ server {
# Thumbnail serving proxy
location /thumbnails {
proxy_pass http://backend:3001;
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -90,7 +90,7 @@ server {
# Uploads serving proxy (logos, favicons, watermarks)
# ^~ modifier stops regex matching, ensuring uploads are proxied not served locally
location ^~ /uploads {
proxy_pass http://backend:3001;
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@@ -104,7 +104,7 @@ server {
# Delegate root requests to backend for public landing page handling
location = / {
proxy_pass http://backend:3001/;
proxy_pass http://backend:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';