Skip to content

Commit

Permalink
Build prod docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjourne committed Oct 24, 2023
1 parent a3a23f1 commit ea5164b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose-frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
context: ${FRONTEND}
dockerfile: Dockerfile
target: build
target: prod
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
Expand Down
3 changes: 2 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ CMD [ "npm", "run","dev" ]
# Step 3: "build" target #
################################
FROM base as build
RUN npm run build
CMD ["npm", "run", "build"]
#CMD ["npx", "sapper", "export"]
################################
Expand All @@ -57,6 +58,6 @@ USER node:node
WORKDIR /app
COPY --from=build --chown=node:node /app/__sapper__/build ./build
COPY --from=build --chown=node:node /app/node_modules ./node_modules
COPY --from=build --chown=node:node /app/ViewerJS ./ViewerJS
COPY --from=base --chown=node:node /app/ViewerJS ./ViewerJS
COPY --chown=node:node package.json .
CMD ["node","build"]

0 comments on commit ea5164b

Please sign in to comment.