41 lines
1.1 KiB
Nginx Configuration File
41 lines
1.1 KiB
Nginx Configuration File
|
|
events {}
|
||
|
|
http {
|
||
|
|
upstream backend { server backend:8000; }
|
||
|
|
upstream frontend { server frontend:5173; }
|
||
|
|
|
||
|
|
map $http_upgrade $connection_upgrade {
|
||
|
|
default upgrade;
|
||
|
|
'' close;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://frontend;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $connection_upgrade;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /api/ {
|
||
|
|
proxy_pass http://backend;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $connection_upgrade;
|
||
|
|
proxy_read_timeout 86400;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /ocpp/ {
|
||
|
|
proxy_pass http://backend;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $connection_upgrade;
|
||
|
|
proxy_read_timeout 86400;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|