-
Notifications
You must be signed in to change notification settings - Fork 2
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
2 changed files
with
31 additions
and
26 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,24 +1,29 @@ | ||
FROM node:20 | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-lang-all | ||
|
||
COPY package*.json /usr/src/app | ||
COPY tsconfig.json /usr/src/app | ||
COPY ormconfig.json /usr/src/app | ||
COPY tsoa.json /usr/src/app | ||
COPY src /usr/src/app/src | ||
COPY templates /usr/src/app/templates | ||
|
||
RUN npm ci | ||
RUN npm install pm2 -g | ||
|
||
ENV NODE_ENV production | ||
|
||
RUN npm run tsoa && npm run build | ||
EXPOSE 3001 | ||
|
||
CMD ["pm2-runtime","/usr/src/app/dist/index.js"] | ||
FROM node:20 | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-lang-all | ||
|
||
COPY package.json /usr/src/app | ||
COPY yarn.lock /usr/src/app | ||
COPY tsconfig.json /usr/src/app | ||
COPY ormconfig.json /usr/src/app | ||
COPY tsoa.json /usr/src/app | ||
COPY .yarnrc.yml /usr/src/app | ||
|
||
COPY build /usr/src/app | ||
COPY src /usr/src/app/src | ||
COPY templates /usr/src/app/templates | ||
|
||
RUN corepack enable | ||
RUN yarn install --immutable | ||
RUN npm install pm2@latest -g | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN yarn build | ||
EXPOSE 3001 | ||
|
||
CMD ["pm2-runtime", "yarn", "--", "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