Skip to content

Commit

Permalink
Update API dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Nov 11, 2023
1 parent 728e45f commit 229447a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/docker/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY --chown=node:node . .

# Generate the prisma client
RUN npx prisma generate
RUN npx prisma generate --schema=./src/prisma/moodle/schema.prisma

# For container development, the following command runs forever, so we can inspect the container
CMD npx tsc-watch --onSuccess "npx nodemon --config ./src/api/nodemon.json"
Expand Down Expand Up @@ -60,6 +61,10 @@ COPY --chown=node:node --from=development /usr/src/app/node_modules ./node_modul

# Copy over the existing source code
COPY --chown=node:node . .

# RUN npx prisma generate
# RUN npx prisma generate --schema=./src/prisma/moodle/schema.prisma

# Build the code
RUN tsc

Expand Down Expand Up @@ -94,7 +99,8 @@ RUN npm install pm2 -g
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/build ./build

RUN npx prisma generate
# RUN npx prisma generate
# RUN npx prisma generate --schema=./src/prisma/moodle/schema.prisma

USER node

Expand Down

0 comments on commit 229447a

Please sign in to comment.