Merge branch 'addOpaToBuild' into 'main'

add opa to build

See merge request v3/service/auth!21
This commit is contained in:
Sylvain Briat 2023-03-13 11:07:30 +00:00
commit 7890126580
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 prisma (needed for migrations)
COPY --chown=node:node ./prisma prisma COPY --chown=node:node ./prisma prisma
# Copy policies
COPY --chown=node:node ./opa opa
# Run the build command which creates the production bundle # Run the build command which creates the production bundle
RUN npm run build 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 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/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/prisma ./prisma 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 --from=build /usr/src/app/dist ./dist
COPY --chown=node:node ./opa opa
# Start the server using the production build # Start the server using the production build
CMD [ "node", "dist/main.js" ] CMD [ "node", "dist/main.js" ]