Link and Leafcutter Dockerfiles

This commit is contained in:
Darren Clarke 2023-05-26 15:40:34 +00:00
parent 6dc4cfd3cc
commit 4e4603bd71
5 changed files with 42 additions and 28 deletions

View file

@ -15,7 +15,7 @@ WORKDIR ${APP_DIR}
COPY .gitignore .gitignore
COPY --from=builder ${APP_DIR}/out/json/ .
COPY --from=builder ${APP_DIR}/out/package-lock.json ./package-lock.json
RUN npm install
RUN npm ci --omit=dev
COPY --from=builder ${APP_DIR}/out/full/ .
RUN npm i -g turbo
@ -40,10 +40,12 @@ USER node
WORKDIR ${APP_DIR}
COPY --from=installer ${APP_DIR}/node_modules/ ./node_modules/
COPY --from=installer ${APP_DIR}/apps/link/ ./apps/link/
COPY --from=installer ${APP_DIR}/package.json ./package.json
USER root
RUN chmod +x ./apps/link/docker-entrypoint.sh
WORKDIR ${APP_DIR}/apps/link/
RUN chmod +x docker-entrypoint.sh
USER node
EXPOSE 3000
ENV PORT 3000
ENV NODE_ENV production
ENTRYPOINT ["./apps/link/docker-entrypoint.sh"]
ENTRYPOINT ["/opt/link/apps/link/docker-entrypoint.sh"]

View file

@ -1,7 +1,6 @@
#!/bin/bash
set -e
cd ${APP_DIR}
echo "starting link"
exec dumb-init npm run start