waterwolf-auth/configs/nginx-dev.conf
2024-10-16 17:42:02 -04:00

46 lines
No EOL
1.3 KiB
Text

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
#Custom Nest.js API
location /api/ {
resolver 127.0.0.11 valid=30s; # Docker DNS
proxy_pass http://host.docker.internal:3001/api/; # Local back end
proxy_redirect default;
}
#OIDC Provider
location /oidc/ {
resolver 127.0.0.11 valid=30s; # Docker DNS
proxy_pass http://host.docker.internal:3001/oidc/; # Local back end
proxy_redirect default;
}
#Frontend Next.js App
location / {
resolver 127.0.0.11 valid=30s; # Docker DNS
proxy_pass http://host.docker.internal:3001/; # Local back end
proxy_redirect default;
}
}
}