[+] Better deploy guide

This commit is contained in:
Azalea Gui
2023-02-11 17:06:05 -05:00
parent 782e1d7125
commit e8ff1cf7f7
2 changed files with 54 additions and 41 deletions
+24
View File
@@ -0,0 +1,24 @@
# The MeowIndex web app block
location /__meowindex__ {
alias /etc/nginx/MeowIndex/dist;
# Use sub_filter to configure the app
sub_filter_types application/javascript;
sub_filter_once off;
sub_filter "{DEPLOY-PATH-PLACEHOLDER}" "/__meowindex__";
sub_filter "{HOST-PLACEHOLDER}" "/api";
sub_filter "\"/assets" "\"/__meowindex__/assets";
# Serve index.html on other 404 paths as well
try_files $uri /__meowindex__/index.html;
}
# The api block
location /api {
rewrite ^/api(/.*)$ $1 break;
index DISABLE_INDEX_HTML_AUTO_MATCHING;
autoindex on;
autoindex_format json;
add_header Access-Control-Allow-Origin *;
}