forked from watchdogpolska/small_eod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
38 lines (31 loc) · 778 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
upstream backend {
server backend:8000;
}
upstream frontend {
server frontend:8000;
}
server {
# temporary mock while we don't have login functionality in backend
# or frontend functionality provided by bootstrapped Ant Design is not yet
# removed
location ~ ^/api/(notices|auth_routes|currentUser|login/account|register|500|404|403|401|login/captcha) {
rewrite ^/api/(.*) /api/$1 break;
proxy_pass http://frontend;
}
location /static/ {
autoindex off;
alias /static/;
}
location /api {
proxy_set_header X-Forwarded-Host localhost:8000;
proxy_pass http://backend/api;
}
location /admin {
proxy_pass http://backend/admin;
}
location / {
proxy_pass http://frontend/;
}
listen 8000;
server_name localhost;
}