Skip to content

Commit

Permalink
chore: update dockerfile with npm based builds
Browse files Browse the repository at this point in the history
  • Loading branch information
notaphplover committed Aug 9, 2024
1 parent 8c595b3 commit 4bf81f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,15 @@ COPY --from=backendservicegatewaybuild /prod/backend-service-gateway /prod/backe
WORKDIR /prod/backend-service-gateway
EXPOSE 3003
CMD [ "pnpm", "serve" ]

FROM base AS npmbackendconsumergame
RUN pnpm i -g --prod @cornie-js/[email protected]
CMD [ "cornie-js-game-consumer-bootstrap" ]

FROM base AS npmbackendservicegame
RUN pnpm i -g --prod @cornie-js/[email protected]
CMD [ "cornie-js-game-service-bootstrap" ]

FROM base AS npmbackendserviceuser
RUN pnpm i -g --prod @cornie-js/[email protected]
CMD [ "cornie-js-user-service-bootstrap" ]
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
"commit": "commit",
"docker:build:game": "docker build . -f ./docker/backend/Dockerfile --target backendservicegame --tag robertopintosl/one-game-backend-service-game:latest",
"docker:build:game:consumer": "docker build . -f ./docker/backend/Dockerfile --target backendconsumergame --tag robertopintosl/one-game-backend-consumer-game:latest",
"docker:build:game:consumer:npm": "docker build . -f ./docker/backend/Dockerfile --target npmbackendconsumergame --tag robertopintosl/one-game-backend-consumer-game:0.3.0 --tag robertopintosl/one-game-backend-consumer-game:0.3 --tag robertopintosl/one-game-backend-consumer-game:0 --tag robertopintosl/one-game-backend-consumer-game:latest",
"docker:build:game:service:npm": "docker build . -f ./docker/backend/Dockerfile --target npmbackendconsumergame --tag robertopintosl/one-game-backend-service-game:0.3.0 --tag robertopintosl/one-game-backend-service-game:0.3 --tag robertopintosl/one-game-backend-service-game:0 --tag robertopintosl/one-game-backend-service-game:latest",
"docker:build:user": "docker build . -f ./docker/backend/Dockerfile --target backendserviceuser --tag robertopintosl/one-game-backend-service-user:latest",
"docker:build:user:service:npm": "docker build . -f ./docker/backend/Dockerfile --target npmbackendserviceuser --tag robertopintosl/one-game-backend-service-user:0.3.0 --tag robertopintosl/one-game-backend-service-user:0.3 --tag robertopintosl/one-game-backend-service-user:0 --tag robertopintosl/one-game-backend-service-user:latest",
"docker:build:web-ui": "docker build . -f ./docker/frontend/Dockerfile --target frontendservicewebui --tag robertopintosl/one-game-frontend-service-web-ui:latest",
"format": "turbo run format",
"lint": "turbo run lint",
Expand Down

0 comments on commit 4bf81f9

Please sign in to comment.