Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
README.md
LICENSE
tests
dist
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mhart/alpine-node:8.11.2 as build
WORKDIR /usr/app
COPY . .
RUN npm install --only=production
RUN mv node_modules prod_modules
RUN npm install
ENV NODE_ENV production
RUN npm run build

FROM mhart/alpine-node:base-8.11.2
WORKDIR /usr/app
ENV NODE_ENV production
COPY --from=build /usr/app/prod_modules ./node_modules
COPY --from=build /usr/app/dist ./dist
COPY --from=build /usr/app/package.json ./package.json
COPY --from=build /usr/app/src/style.min.css ./src/style.min.css
EXPOSE 3007
CMD node dist/server.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prettier": "prettier \"./src/**/*.ts\" \"./src/**/*.tsx\" --write",
"test": "tsc --outDir . --sourceMap false && tape tests/**/*.js",
"release": "npm version patch && git push --follow-tags && npm publish",
"deploy": "now --public && now alias"
"deploy": "now --docker --public && now alias"
},
"license": "MIT",
"dependencies": {
Expand Down