Skip to content

Commit 07559c6

Browse files
committed
Add Dockerfile
1 parent 9d086c7 commit 07559c6

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode
2+
README.md
3+
LICENSE
4+
tests
5+
dist

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM mhart/alpine-node:8.11.2 as build
2+
WORKDIR /usr/app
3+
COPY . .
4+
RUN npm install --only=production
5+
RUN mv node_modules prod_modules
6+
RUN npm install
7+
ENV NODE_ENV production
8+
RUN npm run build
9+
10+
FROM mhart/alpine-node:base-8.11.2
11+
WORKDIR /usr/app
12+
ENV NODE_ENV production
13+
COPY --from=build /usr/app/prod_modules ./node_modules
14+
COPY --from=build /usr/app/dist ./dist
15+
COPY --from=build /usr/app/package.json ./package.json
16+
COPY --from=build /usr/app/src/style.min.css ./src/style.min.css
17+
EXPOSE 3007
18+
CMD node dist/server.js

0 commit comments

Comments
 (0)