All checks were successful
Deploy on Push to Main / deploy (push) Successful in 42s
70 lines
2.0 KiB
Nginx Configuration File
70 lines
2.0 KiB
Nginx Configuration File
worker_processes auto;
|
|
pid /tmp/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
charset utf-8;
|
|
|
|
access_log off;
|
|
error_log /dev/stderr warn;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
keepalive_requests 1000;
|
|
|
|
gzip on;
|
|
gzip_comp_level 6;
|
|
gzip_proxied any;
|
|
gzip_min_length 256;
|
|
gzip_vary on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
|
|
|
server {
|
|
listen 7080;
|
|
server_name localhost;
|
|
|
|
# Serwowanie statycznych plików Django Admina
|
|
location /mayo-manager/static/ {
|
|
alias /static_django/;
|
|
}
|
|
|
|
# Serwowanie aplikacji Vue
|
|
location /mayo-manager/ {
|
|
alias /usr/share/nginx/html/;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Proxy do API Django
|
|
location ~ ^/mayo-manager/api/?$ {
|
|
if ($request_uri !~ /$) {
|
|
return 301 $request_uri/;
|
|
}
|
|
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/api/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Proxy do panelu admina Django
|
|
location ~ ^/mayo-manager/admin/?$ {
|
|
if ($request_uri !~ /$) {
|
|
return 301 $request_uri/;
|
|
}
|
|
proxy_pass http://mayo-production-manager-backend:7090/mayo-manager/admin/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
error_page 404 /mayo-manager/index.html;
|
|
}
|
|
} |