-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from jackblk/master
feat: dockerize the app
- Loading branch information
Showing
3 changed files
with
51 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,26 @@ | ||
# From gitignore (modified) | ||
*.bat | ||
*.log | ||
*.lnk | ||
node_modules | ||
package-lock.json | ||
DeviceAuthGenerator.exe | ||
device_auths.json | ||
.egstore | ||
.vscode | ||
*.code-workspace | ||
.idea | ||
.github | ||
|
||
# Folders | ||
.git | ||
test | ||
|
||
# Other files | ||
*Dockerfile* | ||
*dockerignore* | ||
.gitignore | ||
LICENSE | ||
README* | ||
.eslintrc.json | ||
.editorconfig |
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,24 @@ | ||
# Builder stage | ||
FROM node:16-alpine3.13 as builder | ||
# Install dependencies for building node modules | ||
# python3, g++, make: required by node-gyp | ||
# git: required by check-update-github | ||
WORKDIR /app | ||
COPY ./package.json ./package.json | ||
RUN apk add --no-cache --virtual \ | ||
.gyp \ | ||
python3=~3.8 \ | ||
make=~4.3 \ | ||
g++=~10.2 \ | ||
git=~2.30 \ | ||
&& npm install --only=production \ | ||
&& apk del .gyp | ||
|
||
# App stage | ||
FROM node:16-alpine3.13 as app | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
COPY --from=builder /app/node_modules ./node_modules | ||
|
||
CMD ["npm", "start", "--no-update-notifier"] |
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