Skip to content

Commit

Permalink
fix: lefthook on docker
Browse files Browse the repository at this point in the history
  • Loading branch information
riipandi committed Sep 4, 2024
1 parent 12b078d commit 88ebfbf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/build
/dist
.cache
.husky
.DS_Store
.DS_Store?
.dockerignore
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:
- 'v*.*.*'

env:
HUSKY: 0
LEFTHOOK: 0
CI: true

permissions:
contents: write
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ permissions: read-all

env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
HUSKY: 0
LEFTHOOK: 0
CI: true

jobs:
test:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARG NODE_VERSION=20
# -----------------------------------------------------------------------------
FROM --platform=${PLATFORM} node:${NODE_VERSION}-alpine AS base
ENV PNPM_HOME="/pnpm" PATH="$PNPM_HOME:$PATH" COREPACK_ENABLE_DOWNLOAD_PROMPT=0
ENV LEFTHOOK=0 CI=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true
RUN corepack enable && corepack prepare pnpm@latest-9 --activate
WORKDIR /srv

Expand All @@ -22,7 +23,7 @@ FROM base AS builder
COPY --chown=node:node . .

RUN apk update && apk add --no-cache tini jq libc6-compat
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install && pnpm build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --ignore-scripts && pnpm build

# -----------------------------------------------------------------------------
# Compile the application and install production only dependencies.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"e2e-test:install": "playwright install-deps",
"e2e-test:ui": "playwright test --ui",
"preinstall": "npx only-allow pnpm",
"prepare": "lefthook install",
"prepare": "lefthook install || true",
"lint": "biome lint . --write",
"check": "biome check . --write",
"format": "biome format . --write",
Expand Down

0 comments on commit 88ebfbf

Please sign in to comment.