Prvotní nástřel fungující aplikace
This commit is contained in:
2
nginx/Dockerfile
Normal file
2
nginx/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM nginx
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
47
nginx/default.conf
Normal file
47
nginx/default.conf
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user