fix nginx

This commit is contained in:
diyaa 2026-03-15 21:32:32 +01:00
parent 55013326a3
commit e51c786782
2 changed files with 30 additions and 8 deletions

View File

@ -0,0 +1,17 @@
server {
listen 80;
server_name diyaa.de www.diyaa.de;
location / {
proxy_pass http://web:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

View File

@ -10,8 +10,8 @@ services:
NEXT_PUBLIC_LINKEDIN_URL: ${NEXT_PUBLIC_LINKEDIN_URL:-}
NEXT_PUBLIC_GITHUB_URL: ${NEXT_PUBLIC_GITHUB_URL:-}
container_name: ${CONTAINER_NAME:-diyaa}
ports:
- "127.0.0.1:30002:3000"
expose:
- "3000"
environment:
NODE_ENV: ${NODE_ENV:-production}
PORT: 3000
@ -22,10 +22,15 @@ services:
NEXT_PUBLIC_CONTACT_EMAIL: ${NEXT_PUBLIC_CONTACT_EMAIL:-}
NEXT_PUBLIC_LINKEDIN_URL: ${NEXT_PUBLIC_LINKEDIN_URL:-}
NEXT_PUBLIC_GITHUB_URL: ${NEXT_PUBLIC_GITHUB_URL:-}
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:3000/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
restart: unless-stopped
nginx:
image: nginx:stable-alpine
container_name: nginx
depends_on:
- web
ports:
- "80:80"
vvolumes:
- ./default.conf:/etc/nginx/conf.d/default.conf:ro
restart: unless-stopped