Skip to content

Commit

Permalink
Add working docker
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Oct 6, 2018
1 parent 1bf72e7 commit 39933b1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
@@ -0,0 +1,6 @@
*
!src/*
!build/*
!package.json
!package-lock.json
!main.js
20 changes: 20 additions & 0 deletions Dockerfile
@@ -0,0 +1,20 @@
FROM node:carbon
WORKDIR /srv/www

# make node_modules cached.
# Src: https://nodesource.com/blog/8-protips-to-start-killing-it-when-dockerizing-node-js/
#
COPY package.json package-lock.json ./

# When running with --production --pure-lockfile,
# There will always be some missing modules. Dunno why...
#
RUN npm install --production

# Other files, so that other files do not interfere with node_modules cache
#
COPY . .

EXPOSE 5001

ENTRYPOINT NODE_ENV=production node build/index

0 comments on commit 39933b1

Please sign in to comment.