Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* | ||
!src/* | ||
!build/* | ||
!package.json | ||
!package-lock.json | ||
!main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |