Skip to content

Commit 949ed93

Browse files
author
deonbotha
authored
Feature/dockerize (#7)
* Added Dockerfile * Add Dockerfile and dockerignore
1 parent 4041584 commit 949ed93

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

‎.dockerignore‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
deploy/
2+
coverage/
3+
node_modules/
4+
.dockerignore
5+
.editorconfig
6+
.git/
7+
.gitignore
8+
.istanbul.yml
9+
circle.yml
10+
docker-compose.circle.yml
11+
docker-compose.dev.yml
12+
docker-compose.functional.yml
13+
docker-compose.yml
14+
Dockerfile
15+
LICENSE
16+
README.md
17+
sonar-project.properties

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pids
1111
*.seed
1212
*.pid.lock
1313

14+
1415
# Directory for instrumented libs generated by jscoverage/JSCover
1516
lib-cov
1617

‎Dockerfile‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM mhart/alpine-node:8.9.4
2+
USER root
3+
4+
WORKDIR /opt/email-notifier
5+
6+
COPY src /opt/email-notifier/src
7+
COPY config /opt/email-notifier/config
8+
COPY package.json /opt/email-notifier/
9+
COPY app.js /opt/email-notifier/
10+
COPY templates /opt/email-notifier/templates
11+
12+
RUN apk --no-cache add git
13+
RUN apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake \
14+
&& cd $(npm root -g)/npm \
15+
&& npm config set unsafe-perm true \
16+
&& npm install -g node-gyp
17+
18+
RUN npm install --production && \
19+
npm uninstall -g npm
20+
21+
RUN apk del build-dependencies
22+
23+
EXPOSE 3081
24+
CMD node app.js

‎src/setup.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Utility = require('./lib/utility')
3333
const Logger = require('@mojaloop/central-services-shared').Logger
3434
const Rx = require('rxjs')
3535
const { filter, switchMap } = require('rxjs/operators')
36-
const Observables = require('./observeables')
36+
const Observables = require('./observables')
3737
const createHealtcheck = require('healthcheck-server')
3838
const Config = require('./lib/config')
3939

0 commit comments

Comments
 (0)