Introduce Dockerfile

This commit is contained in:
2024-02-18 16:17:54 +01:00
parent 2b29a8e4b2
commit 4d07719066
6 changed files with 54 additions and 14 deletions
+23
View File
@@ -0,0 +1,23 @@
# Build stage
FROM node:lts-alpine as build
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Final stage
FROM node:lts-alpine as final
EXPOSE 3000
WORKDIR /usr/src/app
COPY --from=build /usr/src/app/build .
RUN npm i -g serve
CMD serve