zappyzep/docker/production/nginx/default.conf
laraproto c2da2a8058
Some checks failed
Code quality checks / build (23) (push) Successful in 34s
Push code / build (push) Failing after 37s
let's see if this works
2024-11-02 16:17:41 +02:00

29 lines
829 B
Text

server {
listen 80 default_server;
server_name _;
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
set $backend_upstream "http://api:3001";
set $dashboard_upstream "http://dashboard:3002";
set $newdashboard_upstream "http://revampdashboard:3000";
location / {
# Using a variable in proxy_pass also requires resolver to be set.
# This is the address of the internal docker compose DNS server.
resolver 127.0.0.11;
proxy_pass $dashboard_upstream$uri$is_args$args;
}
location /new {
resolver 127.0.0.11;
proxy_pass $newdashboard_upstream$uri$is_args$args;
}
location /api {
resolver 127.0.0.11;
proxy_pass $backend_upstream$uri$is_args$args;
proxy_redirect off;
client_max_body_size 200M;
}
}