This commit is contained in:
2022-11-08 21:19:51 +01:00
commit 4c456eafc3
160 changed files with 21472 additions and 0 deletions

39
nginx/default.conf Normal file
View File

@@ -0,0 +1,39 @@
upstream django {
server backend-django:8001;
}
server {
listen 80;
#listen [::]:80;
server_name localhost;
proxy_read_timeout 7200;
proxy_connect_timeout 7200;
proxy_send_timeout 7200;
# backend-django #1
location ^~ /staticfiles/ {
alias staticfiles/;
}
# backend-django #2
location ~ ^/(api|accounts|admin)/? {
proxy_pass http://django;
proxy_set_header Host $host;
proxy_redirect off;
}
# frontend-react
location / {
root /usr/share/nginx/html/static/frontend;
index index.html index.htm;
try_files $uri $uri/ /index.html;
gzip on;
gzip_comp_level 3;
gzip_vary on;
gzip_types application/javascript application/json application/xml image/bmp image/jpeg image/gif image/png image/svg+xml text/css text/html text/plain;
}
}