mirror of
https://github.com/immich-app/immich.git
synced 2026-02-04 08:49:01 +03:00
fix: patch-package install in docker build and better postgres patch (#17523)
* always patch package when running npm i, install immich CLI outside of directory so post install doesnt run * handles case where query is an object and defined but origin is not. * move patch-package from a dev dependency to a normal dependency. Also copy the patches folder for the docker build to use and patch with * fix Dockerfile * use query.reject instead of throw for queryError * package-lock to reflect the dev dependency change * dont throw the error, just provide an empty string for query.origin if it does not exist * remove npm link and demote patch-package back to a dev dependency * modify patch to add defensive check to catch queries that will fail to parse and reject
This commit is contained in:
@@ -4,6 +4,7 @@ FROM ghcr.io/immich-app/base-server-dev:202503251114@sha256:10e8973e8603c5729436
|
||||
RUN apt-get install --no-install-recommends -yqq tini
|
||||
WORKDIR /usr/src/app
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
COPY server/patches ./patches
|
||||
RUN npm ci && \
|
||||
# exiftool-vendored.pl, sharp-linux-x64 and sharp-linux-arm64 are the only ones we need
|
||||
# they're marked as optional dependencies, so we need to copy them manually after pruning
|
||||
@@ -56,7 +57,7 @@ COPY server/resources resources
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
COPY server/start*.sh ./
|
||||
COPY "docker/scripts/get-cpus.sh" ./
|
||||
RUN npm link && npm install -g @immich/cli && npm cache clean --force
|
||||
RUN npm install -g @immich/cli && npm cache clean --force
|
||||
COPY LICENSE /licenses/LICENSE.txt
|
||||
COPY LICENSE /LICENSE
|
||||
ENV PATH="${PATH}:/usr/src/app/bin"
|
||||
|
||||
Reference in New Issue
Block a user