✨ Introduce Dockerfile
This commit is contained in:
1 parent
2b29a8e4b2
commit
4d07719066
6 files changed
+54
-14
No files matched your search
+23
@@ -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
|
||||
Reference in new issue
Block a user