mirror of
https://github.com/AtHeartEngineering/bandada.git
synced 2026-01-09 02:48:04 -05:00
chore: add index.html redirects in Dockerfile of client and dashboard
This commit is contained in:
@@ -13,6 +13,8 @@ RUN yarn build:all
|
|||||||
|
|
||||||
# Create image for the app by copying build artifacts from builder
|
# Create image for the app by copying build artifacts from builder
|
||||||
FROM nginx:stable-alpine as runner
|
FROM nginx:stable-alpine as runner
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
COPY ./nginx.conf /etc/nginx/conf.d
|
||||||
COPY --from=builder /builder/dist/apps/client /usr/share/nginx/html
|
COPY --from=builder /builder/dist/apps/client /usr/share/nginx/html
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ RUN yarn build:all
|
|||||||
|
|
||||||
# Create image for the app by copying build artifacts from builder
|
# Create image for the app by copying build artifacts from builder
|
||||||
FROM nginx:stable-alpine as runner
|
FROM nginx:stable-alpine as runner
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
COPY ./nginx.conf /etc/nginx/conf.d
|
||||||
COPY --from=builder /builder/dist/apps/dashboard /usr/share/nginx/html
|
COPY --from=builder /builder/dist/apps/dashboard /usr/share/nginx/html
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
13
nginx.conf
Normal file
13
nginx.conf
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
error_page 404 /index.html;
|
||||||
|
location = / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user