mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-01-28 10:34:30 +08:00
fix(docker): nginx config to redirect to index.html
This commit is contained in:
parent
c339ab3551
commit
972ffe6f69
2 changed files with 11 additions and 0 deletions
|
@ -9,5 +9,6 @@ RUN pnpm build
|
||||||
# production stage
|
# production stage
|
||||||
FROM nginx:stable-alpine as production-stage
|
FROM nginx:stable-alpine as production-stage
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
10
nginx.conf
Normal file
10
nginx.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue