Skip to content

Commit

Permalink
handle file based logging in Dockerfile, update dependencies (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisdaly authored Dec 5, 2019
1 parent bb73471 commit aa81dfc
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 21 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.15.3-alpine
FROM node:10.15.3-alpine as builder

WORKDIR /opt/central-settlement

Expand All @@ -7,14 +7,23 @@ RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool aut
&& npm config set unsafe-perm true

COPY package.json package-lock.json* /opt/central-settlement/
RUN npm install --production && \
npm uninstall -g npm

RUN apk del build-dependencies
RUN npm install

COPY config /opt/central-settlement/config
COPY src /opt/central-settlement/src
COPY README.md /opt/central-settlement

FROM node:10.15.3-alpine
WORKDIR /opt/central-settlement

COPY --from=builder /opt/central-settlement .

RUN npm prune --production

# Create empty log file & link stdout to the application log file
RUN mkdir ./logs && touch ./logs/combined.log
RUN ln -sf /dev/stdout ./logs/combined.log

EXPOSE 3007
CMD node src/server.js
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ services:
ports:
- "3007:3007"
volumes:
- ./docker/central-settlement/default.json:/opt/central-settlement/config/default.json
- ./docker/central-settlement/default.json:/opt/central-settlement/config/default.json
environment:
- CSL_LOG_TRANSPORT=file

central-ledger:
image: mojaloop/central-ledger:latest
Expand Down
46 changes: 35 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "central-settlement",
"description": "Central settlements hosted by a scheme to record and make settlements",
"version": "8.5.0",
"version": "8.6.0",
"license": "Apache-2.0",
"private": false,
"author": "ModusBox",
Expand All @@ -28,13 +28,13 @@
"@hapi/hapi": "18.4.0",
"@hapi/inert": "5.2.2",
"@hapi/vision": "5.5.4",
"@mojaloop/central-ledger": "8.2.4",
"@mojaloop/central-services-auth": "5.2.1",
"@mojaloop/central-ledger": "8.2.4",
"@mojaloop/central-services-database": "8.2.1",
"@mojaloop/central-services-error-handling": "8.6.2",
"@mojaloop/central-services-health": "8.3.0",
"@mojaloop/central-services-logger": "8.5.2",
"@mojaloop/central-services-shared": "8.6.2",
"@mojaloop/central-services-logger": "8.6.0",
"@mojaloop/central-services-shared": "8.6.3",
"@mojaloop/central-services-stream": "8.4.0",
"@mojaloop/forensic-logging-client": "8.3.0",
"@mojaloop/ml-number": "8.2.0",
Expand All @@ -44,7 +44,7 @@
"hapi-openapi": "1.2.6",
"hapi-pagination": "3.0.0",
"mustache": "3.1.0",
"parse-strings-in-object": "1.2.0",
"parse-strings-in-object": "2.0.0",
"rc": "1.2.8",
"uuid4": "1.1.4"
},
Expand Down

0 comments on commit aa81dfc

Please sign in to comment.