Merge pull request #240 from ilogus/fix-docker-build-warning

Fix casing do not match warning
This commit is contained in:
1ilit 2024-09-11 09:59:31 +04:00 committed by GitHub
commit 322ef962d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
# Stage 1: Build the app # Stage 1: Build the app
FROM node:20-alpine as build FROM node:20-alpine AS build
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
@ -7,7 +7,7 @@ COPY . .
RUN npm run build RUN npm run build
# Stage 2: Setup the Nginx Server to serve the app # Stage 2: Setup the Nginx Server to serve the app
FROM nginx:stable-alpine3.17 as production FROM nginx:stable-alpine3.17 AS production
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
RUN echo 'server { listen 80; server_name _; root /usr/share/nginx/html; location / { try_files $uri /index.html; } }' > /etc/nginx/conf.d/default.conf RUN echo 'server { listen 80; server_name _; root /usr/share/nginx/html; location / { try_files $uri /index.html; } }' > /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80