Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Feb 22, 2024
1 parent 8854374 commit e8524dd
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,29 @@ WORKDIR /app

RUN apk add --no-cache imagemagick imagemagick-pdf poppler-utils


####################################################################################################
# PDF2IMG prod
# PDF2IMG dev
####################################################################################################
FROM pdf2img AS pdf2img-prod
FROM pdf2img AS pdf2img-dev

COPY main.mjs /app/
COPY package.json /app/
COPY package-lock.json /app/
RUN mkdir -p /app/temp
RUN npm install --production
ENV NODE_ENV=development
RUN npm install --global nodemon

EXPOSE $PORT
ENTRYPOINT ["node", "main.mjs"]
ENTRYPOINT ["nodemon", "main.mjs"]


####################################################################################################
# PDF2IMG dev
# PDF2IMG prod
####################################################################################################
FROM pdf2img AS pdf2img-dev
FROM pdf2img AS pdf2img-prod

ENV NODE_ENV=development
RUN npm install --global nodemon
COPY main.mjs /app/
COPY package.json /app/
COPY package-lock.json /app/
RUN mkdir -p /app/temp
RUN npm install --omit=dev

EXPOSE $PORT
ENTRYPOINT ["nodemon", "main.mjs"]
ENTRYPOINT ["node", "main.mjs"]

0 comments on commit e8524dd

Please sign in to comment.