add opa to build

This commit is contained in:
sbriat 2023-03-13 12:03:57 +01:00
parent 64f11b52fd
commit 909188ace0
1 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,9 @@ COPY --chown=node:node . .
# Copy prisma (needed for migrations)
COPY --chown=node:node ./prisma prisma
# Copy policies
COPY --chown=node:node ./opa opa
# Run the build command which creates the production bundle
RUN npm run build
@ -68,8 +71,8 @@ COPY --chown=node:node package*.json ./
# Copy the bundled code from the build stage to the production image
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/prisma ./prisma
COPY --chown=node:node --from=build /usr/src/app/opa ./opa
COPY --chown=node:node --from=build /usr/src/app/dist ./dist
COPY --chown=node:node ./opa opa
# Start the server using the production build
CMD [ "node", "dist/main.js" ]