pref: update nginx config

This commit is contained in:
thehrz 2023-08-12 17:25:16 +08:00
parent 898297df9f
commit 75b1821d86
Signed by: thehrz
GPG Key ID: C84CBCE7D5F88855
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ RUN pnpm build
FROM nginx:stable-alpine as production-stage FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/nginx/conf.d /etc/nginx/conf.d COPY --from=build-stage /app/nginx/conf.d /etc/nginx/conf.d
COPY --from=build-stage /app/dist /usr/local/nginx/html/ COPY --from=build-stage /app/dist /usr/share/nginx/html/
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

View File

@ -13,7 +13,7 @@ server {
gzip_vary on; gzip_vary on;
location / { location / {
root /usr/local/nginx/html/; root /usr/local/share/html;
try_files $uri $uri/ /index.html; index index.html index.htm;
} }
} }