Luncher/nginx/default.conf
2023-06-01 23:05:51 +02:00

47 lines
827 B
Plaintext

upstream client {
server client:3000;
}
upstream server {
server server:3001;
}
upstream food_api {
server food_api:3002;
}
server {
listen 80;
location / {
proxy_pass http://client;
}
location /static {
proxy_pass http://client;
}
location /sockjs-node {
proxy_pass http://client;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /socket.io {
proxy_pass http://server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /api/food {
rewrite /api/food(.*) /$1 break;
proxy_pass http://food_api;
}
location /api {
# rewrite /api/(.*) /$1 break;
proxy_pass http://server;
}
}