Skip to content
Snippets Groups Projects
Commit b490fbea authored by michael.minelli's avatar michael.minelli
Browse files

Package => Bug fix: add src in dist path

parent a89a7e76
No related branches found
No related tags found
No related merge requests found
ARG BUILD_WORKDIR=/dojo/ExpressAPI
ARG BUILD_DEPLOY_WORKDIR=/dojo/ExpressAPI
......@@ -7,13 +7,13 @@ FROM node:20-bullseye AS builder
LABEL maintainer="Michaël Minelli <michael-jean.minelli@hesge.ch>"
LABEL Description="Express API for Dojo - Build stage"
ARG BUILD_WORKDIR
ARG BUILD_DEPLOY_WORKDIR
# Create app directory
ADD ExpressAPI/ ${BUILD_WORKDIR}/
ADD .env ${BUILD_WORKDIR}/.env
ADD ExpressAPI/ ${BUILD_DEPLOY_WORKDIR}/
ADD .env ${BUILD_DEPLOY_WORKDIR}/.env
WORKDIR ${BUILD_WORKDIR}
WORKDIR ${BUILD_DEPLOY_WORKDIR}
# Install app dependencies
RUN npm install
......@@ -28,13 +28,13 @@ FROM node:20-bullseye
LABEL maintainer="Michaël Minelli <michael-jean.minelli@hesge.ch>"
LABEL Description="Express API for Dojo - Run stage"
ARG BUILD_WORKDIR
ARG BUILD_DEPLOY_WORKDIR
COPY --from=builder ${BUILD_WORKDIR}/node_modules ./node_modules
COPY --from=builder ${BUILD_WORKDIR}/package*.json ./
COPY --from=builder ${BUILD_WORKDIR}/dist ./dist
COPY --from=builder ${BUILD_WORKDIR}/prisma ./prisma
COPY --from=builder ${BUILD_WORKDIR}/.env ./.env
COPY --from=builder ${BUILD_DEPLOY_WORKDIR}/node_modules ${BUILD_DEPLOY_WORKDIR}/node_modules
COPY --from=builder ${BUILD_DEPLOY_WORKDIR}/package*.json ${BUILD_DEPLOY_WORKDIR}/
COPY --from=builder ${BUILD_DEPLOY_WORKDIR}/dist ${BUILD_DEPLOY_WORKDIR}/dist
COPY --from=builder ${BUILD_DEPLOY_WORKDIR}/prisma ${BUILD_DEPLOY_WORKDIR}/prisma
COPY --from=builder ${BUILD_DEPLOY_WORKDIR}/.env ${BUILD_DEPLOY_WORKDIR}/.env
EXPOSE 30992
......
......@@ -12,7 +12,7 @@
"database:seed" : "npx prisma db seed",
"database:deploy" : "npm run database:migrate && npm run database:seed",
"start:dev" : "npx nodemon src/app.ts",
"start:prod" : "NODE_ENV=production npx node --max-http-header-size=1048576 dist/app.js",
"start:prod" : "NODE_ENV=production npx node --max-http-header-size=1048576 dist/src/app.js",
"start:migrate:prod": "npm run database:deploy && npm run start:prod"
},
"prisma" : {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment