-
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.
- Loading branch information
Showing
6 changed files
with
205 additions
and
1,472 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
FROM keymetrics/pm2:16-slim | ||
FROM eclipse-temurin:17-jdk-jammy | ||
|
||
# Install JDK | ||
RUN apt update && apt install openjdk-11-jdk-headless make g++ python3 -y | ||
# replace shell with bash so we can source files | ||
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | ||
|
||
ENV NODE_VERSION 18.17.0 | ||
|
||
# Installing Node | ||
SHELL ["/bin/bash", "--login", "-i", "-c"] | ||
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | ||
RUN source /root/.bashrc && nvm install $NODE_VERSION | ||
RUN n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; cp -r $n/{bin,lib,share} /usr/local | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
WORKDIR / | ||
RUN mkdir -p /nodejs/fhir-burni/ | ||
RUN chown -R node:node /nodejs | ||
WORKDIR /nodejs/fhir-burni/ | ||
# Bundle APP files | ||
COPY --chown=node:node package*.json /nodejs/fhir-burni/ | ||
COPY --chown=node:node . /nodejs/fhir-burni/ | ||
COPY package*.json /nodejs/fhir-burni/ | ||
COPY . /nodejs/fhir-burni/ | ||
|
||
# Install app dependencies | ||
ENV NPM_CONFIG_LOGLEVEL warn | ||
ENV NODE_ENV production | ||
RUN npm i -g pm2 | ||
RUN npm ci --only=production | ||
RUN node config/generate-config-allResources.js | ||
RUN npm run build | ||
|
||
# Show current folder structure in logs | ||
#RUN ls -al -R | ||
USER node | ||
CMD [ "pm2-runtime", "start", "ecosystem.config.js", "--node-args=\"--max-old-space-size=4096\""] |
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.