Added NGINX to proxy due to limitations on Unifi External Portal Config

This commit is contained in:
Roger Joys
2026-03-15 16:03:25 -07:00
parent 16770d833b
commit d2fca3324d
2 changed files with 20 additions and 3 deletions

View File

@@ -2,9 +2,17 @@ services:
portal: portal:
build: . build: .
restart: unless-stopped restart: unless-stopped
ports:
- "8080:8000"
env_file: env_file:
- .env - .env
expose:
- "8000"
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
volumes: volumes:
- ./app/static:/app/app/static - ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- portal

9
nginx.conf Normal file
View File

@@ -0,0 +1,9 @@
server {
listen 80;
location / {
proxy_pass http://portal:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}