Skip to content

Commit

Permalink
build(docker): disable husky during image build
Browse files Browse the repository at this point in the history
  • Loading branch information
na-ji committed Nov 29, 2024
1 parent 510f15f commit 4c3e647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
FROM node:22 AS build-env

COPY package.json package-lock.json /app/
WORKDIR /app

RUN npm ci --no-save
ENV HUSKY=0

RUN npm ci
COPY . /app
ENV NODE_ENV=production
RUN npm run build
# re-install without dev dependencies
RUN npm ci --omit=dev

FROM gcr.io/distroless/nodejs22-debian12

COPY --from=build-env /app /rotom
WORKDIR /rotom
CMD ["dist/packages/server/main.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dev:client": "nx run client:dev",
"dev:server": "nx run server:dev",
"lint": "nx run-many --target=lint --all",
"prepare": "husky install",
"prepare": "husky || true",
"prettier": "prettier --write --ignore-unknown 'packages/**/*'",
"start": "node dist/packages/server/main.js",
"dev:mock": "NODE_ENV=development NX_PUBLIC_ENABLE_MOCKS=1 nx run-many --target=dev --all",
Expand Down

0 comments on commit 4c3e647

Please sign in to comment.