Skip to content

Commit 08ecb6c

Browse files
committed
Containerize app
1 parent f83a19f commit 08ecb6c

File tree

6 files changed

+268
-169
lines changed

6 files changed

+268
-169
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
npm-debug.log
3+
.env

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@fails-components:registry=https://npm.pkg.github.com
2-
registry=https://registry.npmjs.org
2+
registry=https://registry.npmjs.org
3+
//npm.pkg.github.com/:_authToken=${GH_TOKEN}

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM node:14
2+
3+
ARG ENV
4+
ARG GH_TOKEN
5+
6+
WORKDIR /usr/src/notepadhandler
7+
8+
COPY package*.json ./
9+
COPY .npmrc ./
10+
11+
#debug
12+
RUN if [ "$ENV" = "debug" ] ; then npm install ; else npm ci --only=production; fi
13+
14+
COPY . .
15+
16+
EXPOSE 8080
17+
18+
CMD [ "node", "src/server.js" ]

0 commit comments

Comments
 (0)