salix/services/nginx/nginx.mst

30 lines
608 B
Plaintext

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
autoindex off;
root /usr/share/nginx/html;
{{#services}}
location ~ ^/{{.}}(?:/(.*))?$ {
resolver 127.0.0.11;
proxy_pass http://api:{{defaultPort}}/$1$is_args$args;
}
{{/services}}
location ~ ^/mailer(?:/(.*))?$ {
resolver 127.0.0.11;
proxy_pass http://mailer:{{defaultPort}}/$1$is_args$args;
}
location ~ ^/static(?:/(.*))?$ {
alias /salix/dist/$1;
autoindex on;
}
location ~ ^(?:/(.*))?$ {
resolver 127.0.0.11;
proxy_pass http://api:{{defaultPort}}/$1$is_args$args;
}
}