Prvotní nástřel fungující aplikace

This commit is contained in:
Martin Berka
2023-06-01 23:05:51 +02:00
parent bf379e13ed
commit 12583e6efb
59 changed files with 2194 additions and 1011 deletions

2
nginx/Dockerfile Normal file
View File

@@ -0,0 +1,2 @@
FROM nginx
COPY ./default.conf /etc/nginx/conf.d/default.conf

47
nginx/default.conf Normal file
View 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;
}
}