wait for db before starting the server (#14)

This commit is contained in:
JannikStreek
2024-03-05 15:17:52 +01:00
committed by GitHub
parent 2703da66c8
commit 4cd243335d
3 changed files with 18 additions and 2 deletions

View File

@ -12,17 +12,20 @@ RUN npm run build
FROM base as production
RUN apt-get update
RUN apt-get install -y postgresql-client
ENV NODE_ENV=production
USER node
WORKDIR /home/node/app
COPY package.json package-lock.json ./
COPY package.json package-lock.json entrypoint.sh ./
RUN npm ci
COPY --from=production_buildstage /home/node/app/dist /home/node/app/dist
ENTRYPOINT ["npm", "run", "start:prod"]
CMD ["./entrypoint.sh"]
FROM base as development