-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mojaloop/project#1814): compile ts to js (#96)
* feat: add pr-title-check step to ci/cd * chore: change pr-tools orb to 0.1.10 * feat: compile ts to js for production * fix: config json files are now copied manually * fix: use js instead of ts for migrations and seeds * feat: run migrations inside of docker * fix: bad json formatting * fix: test coverage * fix: working on tricky integration test config
- Loading branch information
Showing
18 changed files
with
250 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
FROM node:12.16.1-alpine as builder | ||
|
||
FROM node:14.15-alpine as builder | ||
USER root | ||
|
||
WORKDIR /opt/auth-service | ||
|
||
RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \ | ||
&& cd $(npm root -g)/npm \ | ||
&& npm config set unsafe-perm true \ | ||
&& npm install -g node-gyp | ||
|
||
COPY package.json package-lock.json* /opt/auth-service/ | ||
|
||
COPY package.json package-lock.json* ./ | ||
RUN npm ci | ||
|
||
COPY . /opt/auth-service | ||
COPY ./ ./ | ||
RUN npm run build | ||
RUN rm -rf src secrets test docs | ||
RUN npm prune --production | ||
|
||
FROM node:12.16.1-alpine | ||
FROM node:14.15-alpine | ||
|
||
WORKDIR /opt/auth-service | ||
|
||
# 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 | ||
|
||
# Create a non-root user: as-user | ||
RUN adduser -D as-user | ||
USER as-user | ||
COPY --chown=as-user --from=builder /opt/auth-service . | ||
# Create a non-root user: ml-user | ||
RUN adduser -D ml-user | ||
USER ml-user | ||
COPY --chown=ml-user --from=builder /opt/auth-service . | ||
|
||
# cleanup | ||
RUN npm prune --production | ||
EXPOSE 4004 | ||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.