2023-03-08 10:26:15 +00:00
|
|
|
events { }
|
2023-03-08 10:16:22 +00:00
|
|
|
|
2023-03-06 21:04:13 +00:00
|
|
|
|
|
|
|
http {
|
|
|
|
sendfile on;
|
|
|
|
upstream django {
|
2023-03-06 21:14:15 +00:00
|
|
|
server planebackend:8000;
|
2023-03-06 21:04:13 +00:00
|
|
|
}
|
2023-03-08 08:44:07 +00:00
|
|
|
upstream nextjs {
|
2023-03-06 21:14:15 +00:00
|
|
|
server planefrontend:3000;
|
2023-03-06 21:04:13 +00:00
|
|
|
}
|
2023-02-21 06:01:43 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
root /www/data/;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
location / {
|
2023-03-08 07:27:33 +00:00
|
|
|
|
2023-02-21 06:01:43 +00:00
|
|
|
proxy_pass http://planefrontend:3000/;
|
|
|
|
proxy_set_header Host $host;
|
2023-03-08 10:55:57 +00:00
|
|
|
add_header Access-Control-Allow-Origin *;
|
2023-03-08 10:59:41 +00:00
|
|
|
add_header Access-Control-Allow-Credentials true;
|
2023-02-21 06:01:43 +00:00
|
|
|
}
|
2023-03-08 10:59:41 +00:00
|
|
|
|
2023-02-21 06:01:43 +00:00
|
|
|
location /api/ {
|
|
|
|
proxy_pass http://planebackend:8000/api/;
|
|
|
|
proxy_set_header Host $host;
|
2023-03-08 10:55:57 +00:00
|
|
|
add_header Access-Control-Allow-Origin *;
|
2023-03-08 10:59:41 +00:00
|
|
|
add_header Access-Control-Allow-Credentials true;
|
2023-02-21 06:01:43 +00:00
|
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
}
|
|
|
|
}
|
2023-03-06 21:04:13 +00:00
|
|
|
}
|