Skip to content

Commit

Permalink
sharp compability mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfagun74 authored Jul 30, 2023
1 parent 4fc828f commit a17c160
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ COPY . .
RUN pnpm run build

FROM base AS prod-deps
COPY package.json pnpm-lock.yaml ./
COPY package.json pnpm-lock.yaml deployment/ ./
RUN pnpm install --prod --frozen-lockfile
# Optional compability mode for older CPUs
RUN /bin/sh deployment/compability-mode.sh

FROM base AS release
ENV NODE_ENV=production
Expand Down
6 changes: 6 additions & 0 deletions deployment/compability-mode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

if [[ ! -z "$SERVER_COMPABILITY_MODE" ]] ; then
echo "Force installing [email protected] to ensure compability with older CPUs"
pnpm install [email protected]
fi

0 comments on commit a17c160

Please sign in to comment.