diff --git a/Dockerfile b/Dockerfile index 213f54e7..b797d5f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/deployment/compability-mode.sh b/deployment/compability-mode.sh new file mode 100644 index 00000000..522da12f --- /dev/null +++ b/deployment/compability-mode.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [[ ! -z "$SERVER_COMPABILITY_MODE" ]] ; then + echo "Force installing sharp@0.27.2 to ensure compability with older CPUs" + pnpm install sharp@0.27.2 +fi \ No newline at end of file