deploy: 挂目录+替换文件部署,构建产物到 deploy/,不重建 web/admin 镜像
Made-with: Cursor
This commit is contained in:
17
deploy/web/default.conf
Normal file
17
deploy/web/default.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# 根路径下的验证文件走热加载目录,替换文件即可生效
|
||||
location ~ ^/([A-Za-z0-9._-]+\.(txt|html|xml))$ {
|
||||
alias /verify-root/$1;
|
||||
}
|
||||
|
||||
location = / {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user