Skip to content

Commit

Permalink
Feature/846 async logging (#103)
Browse files Browse the repository at this point in the history
* Add dep:* scripts, upgrade to latest versions

* Bump package version to 8.6.0

* Update environment variable to be correct for central-services-logger
  • Loading branch information
lewisdaly authored Dec 4, 2019
1 parent c1de48f commit d0e598a
Show file tree
Hide file tree
Showing 4 changed files with 1,589 additions and 70 deletions.
22 changes: 15 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
FROM node:10.15.3-alpine
FROM node:10.15.3-alpine as builder
USER root

WORKDIR /opt/central-event-processor

RUN apk --no-cache add git
RUN apk add --no-cache -t build-dependencies make gcc g++ python libtool autoconf automake \
&& cd $(npm root -g)/npm \
&& npm config set unsafe-perm true \
&& npm install -g node-gyp
&& cd $(npm root -g)/npm \
&& npm config set unsafe-perm true \
&& npm install -g node-gyp

COPY package.json package-lock.json* /opt/central-event-processor/

RUN npm install --production && \
npm uninstall -g npm
RUN npm install

COPY src /opt/central-event-processor/src
COPY config /opt/central-event-processor/config
COPY app.js /opt/central-event-processor/
COPY docs /opt/central-event-processor/docs

RUN apk del build-dependencies
FROM node:10.15.3-alpine

WORKDIR /opt/central-event-processor

COPY --from=builder /opt/central-event-processor .
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 3080
CMD node app.js
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
volumes:
# override the default values with our own - this is because we can't set the kafka and mongo hosts dynamically
- ./docker/central-event-processor/default.json:/opt/central-event-processor/config/default.json
environment:
- CSL_LOG_TRANSPORT=file

ml-api-adapter:
image: mojaloop/ml-api-adapter:latest
Expand Down
Loading

0 comments on commit d0e598a

Please sign in to comment.