zappyzep/docker/production/nginx/default.conf

30 lines
824 B
Text
Raw Normal View History

2022-07-16 22:16:34 +03:00
server {
2024-11-02 16:17:41 +02:00
listen 80 default_server;
server_name _;
2022-07-16 22:16:34 +03:00
# 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";
2024-11-02 16:17:41 +02:00
set $newdashboard_upstream "http://revampdashboard:3000";
2022-07-16 22:16:34 +03:00
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;
2022-07-16 22:16:34 +03:00
}
2024-11-02 16:17:41 +02:00
location /new {
resolver 127.0.0.11;
2024-11-02 16:25:16 +02:00
proxy_pass $newdashboard_upstream$request_uri;
2024-11-02 16:17:41 +02:00
}
2022-07-16 22:16:34 +03:00
location /api {
resolver 127.0.0.11;
proxy_pass $backend_upstream$uri$is_args$args;
proxy_redirect off;
client_max_body_size 200M;
}
}