Skip to content

Commit

Permalink
Merge pull request #105 from jackblk/master
Browse files Browse the repository at this point in the history
feat: dockerize the app
  • Loading branch information
Revadike authored Jun 23, 2021
2 parents 32e11fa + bf3c34e commit daaf33d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .dockerignore
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
24 changes: 24 additions & 0 deletions Dockerfile
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"]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"homepage": "https://github.com/revadike/epicgames-freebies-claimer",
"url": "https://github.com/revadike/epicgames-freebies-claimer",
"devDependencies": {
"@babel/core": "latest",
"@babel/eslint-parser": "latest",
"chai": "*",
"eslint": "latest",
Expand Down

0 comments on commit daaf33d

Please sign in to comment.