mirror of
https://github.com/immich-app/immich.git
synced 2025-08-11 09:16:31 -04:00
Review comments, minor tweaks
This commit is contained in:
parent
687e99ca06
commit
6c81d087c9
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -233,7 +233,7 @@ jobs:
|
|||||||
run: pnpm install --frozen-lockfile && pnpm build
|
run: pnpm install --frozen-lockfile && pnpm build
|
||||||
working-directory: ./open-api/typescript-sdk
|
working-directory: ./open-api/typescript-sdk
|
||||||
- name: Run npm install
|
- name: Run npm install
|
||||||
run: SKIP_SHARP_FILTERING=true pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
- name: Run tsc
|
- name: Run tsc
|
||||||
run: pnpm check:typescript
|
run: pnpm check:typescript
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
@ -341,7 +341,7 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
cache-dependency-path: '**/pnpm-lock.yaml'
|
cache-dependency-path: '**/pnpm-lock.yaml'
|
||||||
- name: Run pnpm install
|
- name: Run pnpm install
|
||||||
run: SKIP_SHARP_FILTERING=true pnpm install --frozen-lockfile
|
run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm install --frozen-lockfile
|
||||||
- name: Run medium tests
|
- name: Run medium tests
|
||||||
run: pnpm test:medium
|
run: pnpm test:medium
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
@ -565,7 +565,7 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
cache-dependency-path: '**/pnpm-lock.yaml'
|
cache-dependency-path: '**/pnpm-lock.yaml'
|
||||||
- name: Install server dependencies
|
- name: Install server dependencies
|
||||||
run: SKIP_SHARP_FILTERING=true pnpm --filter immich install --frozen-lockfile
|
run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich install --frozen-lockfile
|
||||||
- name: Build the app
|
- name: Build the app
|
||||||
run: pnpm --filter immich build
|
run: pnpm --filter immich build
|
||||||
- name: Run API generation
|
- name: Run API generation
|
||||||
@ -619,7 +619,7 @@ jobs:
|
|||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
cache-dependency-path: '**/pnpm-lock.yaml'
|
cache-dependency-path: '**/pnpm-lock.yaml'
|
||||||
- name: Install server dependencies
|
- name: Install server dependencies
|
||||||
run: SKIP_SHARP_FILTERING=true pnpm install --frozen-lockfile
|
run: SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm install --frozen-lockfile
|
||||||
- name: Build the app
|
- name: Build the app
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
- name: Run existing migrations
|
- name: Run existing migrations
|
||||||
|
@ -3,6 +3,7 @@ module.exports = {
|
|||||||
readPackage: (pkg) => {
|
readPackage: (pkg) => {
|
||||||
if (pkg.name && pkg.name === "exiftool-vendored") {
|
if (pkg.name && pkg.name === "exiftool-vendored") {
|
||||||
if (pkg.optionalDependencies["exiftool-vendored.pl"]) {
|
if (pkg.optionalDependencies["exiftool-vendored.pl"]) {
|
||||||
|
// make exiftool-vendored.pl a regular dependency
|
||||||
pkg.dependencies["exiftool-vendored.pl"] =
|
pkg.dependencies["exiftool-vendored.pl"] =
|
||||||
pkg.optionalDependencies["exiftool-vendored.pl"];
|
pkg.optionalDependencies["exiftool-vendored.pl"];
|
||||||
delete pkg.optionalDependencies["exiftool-vendored.pl"];
|
delete pkg.optionalDependencies["exiftool-vendored.pl"];
|
||||||
@ -13,7 +14,15 @@ module.exports = {
|
|||||||
(dep) => dep.startsWith("@img")
|
(dep) => dep.startsWith("@img")
|
||||||
);
|
);
|
||||||
for (const dep of optionalDeps) {
|
for (const dep of optionalDeps) {
|
||||||
if (dep.includes("musl") || process.env.SKIP_SHARP_FILTERING) {
|
// remove all optionalDepdencies from sharp (they will be compiled from source), except:
|
||||||
|
// include the precompiled musl version of sharp, for web/Dockerfile
|
||||||
|
// include precompiled linux-x64 version of sharp, for server/Dockerfile, stage: web-prod
|
||||||
|
// include precompiled linux-arm64 version of sharp, for server/Dockerfile, stage: web-prod
|
||||||
|
if (
|
||||||
|
dep.includes("musl") ||
|
||||||
|
dep.includes("linux-x64") ||
|
||||||
|
dep.includes("linux-arm64")
|
||||||
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
delete pkg.optionalDependencies[dep];
|
delete pkg.optionalDependencies[dep];
|
||||||
|
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ dev-update:
|
|||||||
@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --remove-orphans
|
@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --remove-orphans
|
||||||
|
|
||||||
dev-scale:
|
dev-scale:
|
||||||
@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --scale immich-server=3 --remove-orphans
|
@trap 'make dev-down' EXIT; COMPOSE_BAKE=true docker compose -f ./docker/docker-compose.dev.yml up --build -V --scale immich-server=3 --remove-orphans
|
||||||
|
|
||||||
dev-docs:
|
dev-docs:
|
||||||
npm --prefix docs run start
|
npm --prefix docs run start
|
||||||
|
@ -17,8 +17,6 @@ services:
|
|||||||
immich-server:
|
immich-server:
|
||||||
container_name: immich_server
|
container_name: immich_server
|
||||||
command: ['immich-dev']
|
command: ['immich-dev']
|
||||||
# entrypoint: ["/bin/sh"]
|
|
||||||
# command: ["-c", "sleep infinity"]
|
|
||||||
image: immich-server-dev:latest
|
image: immich-server-dev:latest
|
||||||
# extends:
|
# extends:
|
||||||
# file: hwaccel.transcoding.yml
|
# file: hwaccel.transcoding.yml
|
||||||
|
@ -15,7 +15,7 @@ function dart {
|
|||||||
patch --no-backup-if-mismatch -u api.mustache <api.mustache.patch
|
patch --no-backup-if-mismatch -u api.mustache <api.mustache.patch
|
||||||
|
|
||||||
cd ../../
|
cd ../../
|
||||||
npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile
|
pnpx @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./templates/mobile
|
||||||
|
|
||||||
# Post generate patches
|
# Post generate patches
|
||||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch
|
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch
|
||||||
@ -27,16 +27,15 @@ function dart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function typescript {
|
function typescript {
|
||||||
npx --yes oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/src/fetch-client.ts
|
pnpx oazapfts --optimistic --argumentStyle=object --useEnumType immich-openapi-specs.json typescript-sdk/src/fetch-client.ts
|
||||||
pnpm --filter @immich/sdk install --frozen-lockfile
|
pnpm --filter @immich/sdk install --frozen-lockfile
|
||||||
pnpm --filter @immich/sdk build
|
pnpm --filter @immich/sdk build
|
||||||
}
|
}
|
||||||
|
|
||||||
# requires server to be built
|
# requires server to be built
|
||||||
(
|
(
|
||||||
cd ..
|
cd ..
|
||||||
pnpm --filter immich install
|
SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich build
|
||||||
pnpm --filter immich build
|
|
||||||
pnpm --filter immich sync:open-api
|
pnpm --filter immich sync:open-api
|
||||||
)
|
)
|
||||||
|
|
||||||
|
57
pnpm-lock.yaml
generated
57
pnpm-lock.yaml
generated
@ -8,23 +8,10 @@ settings:
|
|||||||
overrides:
|
overrides:
|
||||||
canvas: 2.11.2
|
canvas: 2.11.2
|
||||||
sharp: ^0.34.2
|
sharp: ^0.34.2
|
||||||
'@img/sharp-darwin-arm64': '-'
|
|
||||||
'@img/sharp-darwin-x64': '-'
|
|
||||||
'@img/sharp-libvips-darwin-arm64': '-'
|
|
||||||
'@img/sharp-libvips-darwin-x64': '-'
|
|
||||||
'@img/sharp-libvips-linux-ppc64': '-'
|
|
||||||
'@img/sharp-libvips-linux-s390x': '-'
|
|
||||||
'@img/sharp-libvips-linuxmusl-arm64': '-'
|
|
||||||
'@img/sharp-linux-s390x': '-'
|
|
||||||
'@img/sharp-linuxmusl-arm64': '-'
|
|
||||||
'@img/sharp-wasm32': '-'
|
|
||||||
'@img/sharp-win32-arm64': '-'
|
|
||||||
'@img/sharp-win32-ia32': '-'
|
|
||||||
'@img/sharp-win32-x64': '-'
|
|
||||||
|
|
||||||
packageExtensionsChecksum: sha256-OKQJWXvw/5wjnkjESlE5+zrJ2KIPjfGGRpkAjonMYro=
|
packageExtensionsChecksum: sha256-DAYr0FTkvKYnvBH4muAER9UE1FVGKhqfRU4/QwA2xPQ=
|
||||||
|
|
||||||
pnpmfileChecksum: sha256-JpGwxClb0+luh+tUPf3D8dtJWrqZ/r0/1oqOJoKoLxU=
|
pnpmfileChecksum: sha256-JydSCGE/nZCNX4UmkEmagfKMgYdl7X4YUSzm835vw9I=
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
|
|
||||||
@ -2605,16 +2592,16 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@img/sharp-libvips-linux-arm@1.1.0':
|
|
||||||
resolution: {integrity: sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@img/sharp-libvips-linux-x64@1.1.0':
|
'@img/sharp-libvips-linux-x64@1.1.0':
|
||||||
resolution: {integrity: sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==}
|
resolution: {integrity: sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
|
'@img/sharp-libvips-linuxmusl-arm64@1.1.0':
|
||||||
|
resolution: {integrity: sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
'@img/sharp-libvips-linuxmusl-x64@1.1.0':
|
'@img/sharp-libvips-linuxmusl-x64@1.1.0':
|
||||||
resolution: {integrity: sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==}
|
resolution: {integrity: sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
@ -2626,18 +2613,18 @@ packages:
|
|||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@img/sharp-linux-arm@0.34.2':
|
|
||||||
resolution: {integrity: sha512-0DZzkvuEOqQUP9mo2kjjKNok5AmnOr1jB2XYjkaoNRwpAYMDzRmAqUIa1nRi58S2WswqSfPOWLNOr0FDT3H5RQ==}
|
|
||||||
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@img/sharp-linux-x64@0.34.2':
|
'@img/sharp-linux-x64@0.34.2':
|
||||||
resolution: {integrity: sha512-sD7J+h5nFLMMmOXYH4DD9UtSNBD05tWSSdWAcEyzqW8Cn5UxXvsHAxmxSesYUsTOBmUnjtxghKDl15EvfqLFbQ==}
|
resolution: {integrity: sha512-sD7J+h5nFLMMmOXYH4DD9UtSNBD05tWSSdWAcEyzqW8Cn5UxXvsHAxmxSesYUsTOBmUnjtxghKDl15EvfqLFbQ==}
|
||||||
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
|
'@img/sharp-linuxmusl-arm64@0.34.2':
|
||||||
|
resolution: {integrity: sha512-NEE2vQ6wcxYav1/A22OOxoSOGiKnNmDzCYFOZ949xFmrWZOVII1Bp3NqVVpvj+3UeHMFyN5eP/V5hzViQ5CZNA==}
|
||||||
|
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
'@img/sharp-linuxmusl-x64@0.34.2':
|
'@img/sharp-linuxmusl-x64@0.34.2':
|
||||||
resolution: {integrity: sha512-DOYMrDm5E6/8bm/yQLCWyuDJwUnlevR8xtF8bs+gjZ7cyUNYXiSf/E8Kp0Ss5xasIaXSHzb888V1BE4i1hFhAA==}
|
resolution: {integrity: sha512-DOYMrDm5E6/8bm/yQLCWyuDJwUnlevR8xtF8bs+gjZ7cyUNYXiSf/E8Kp0Ss5xasIaXSHzb888V1BE4i1hFhAA==}
|
||||||
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
||||||
@ -14358,10 +14345,10 @@ snapshots:
|
|||||||
'@img/sharp-libvips-linux-arm64@1.1.0':
|
'@img/sharp-libvips-linux-arm64@1.1.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@img/sharp-libvips-linux-arm@1.1.0':
|
'@img/sharp-libvips-linux-x64@1.1.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@img/sharp-libvips-linux-x64@1.1.0':
|
'@img/sharp-libvips-linuxmusl-arm64@1.1.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@img/sharp-libvips-linuxmusl-x64@1.1.0':
|
'@img/sharp-libvips-linuxmusl-x64@1.1.0':
|
||||||
@ -14372,16 +14359,16 @@ snapshots:
|
|||||||
'@img/sharp-libvips-linux-arm64': 1.1.0
|
'@img/sharp-libvips-linux-arm64': 1.1.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@img/sharp-linux-arm@0.34.2':
|
|
||||||
optionalDependencies:
|
|
||||||
'@img/sharp-libvips-linux-arm': 1.1.0
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@img/sharp-linux-x64@0.34.2':
|
'@img/sharp-linux-x64@0.34.2':
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@img/sharp-libvips-linux-x64': 1.1.0
|
'@img/sharp-libvips-linux-x64': 1.1.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
'@img/sharp-linuxmusl-arm64@0.34.2':
|
||||||
|
optionalDependencies:
|
||||||
|
'@img/sharp-libvips-linuxmusl-arm64': 1.1.0
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@img/sharp-linuxmusl-x64@0.34.2':
|
'@img/sharp-linuxmusl-x64@0.34.2':
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@img/sharp-libvips-linuxmusl-x64': 1.1.0
|
'@img/sharp-libvips-linuxmusl-x64': 1.1.0
|
||||||
@ -23775,13 +23762,13 @@ snapshots:
|
|||||||
node-gyp: 11.2.0
|
node-gyp: 11.2.0
|
||||||
semver: 7.7.2
|
semver: 7.7.2
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@img/sharp-libvips-linux-arm': 1.1.0
|
|
||||||
'@img/sharp-libvips-linux-arm64': 1.1.0
|
'@img/sharp-libvips-linux-arm64': 1.1.0
|
||||||
'@img/sharp-libvips-linux-x64': 1.1.0
|
'@img/sharp-libvips-linux-x64': 1.1.0
|
||||||
|
'@img/sharp-libvips-linuxmusl-arm64': 1.1.0
|
||||||
'@img/sharp-libvips-linuxmusl-x64': 1.1.0
|
'@img/sharp-libvips-linuxmusl-x64': 1.1.0
|
||||||
'@img/sharp-linux-arm': 0.34.2
|
|
||||||
'@img/sharp-linux-arm64': 0.34.2
|
'@img/sharp-linux-arm64': 0.34.2
|
||||||
'@img/sharp-linux-x64': 0.34.2
|
'@img/sharp-linux-x64': 0.34.2
|
||||||
|
'@img/sharp-linuxmusl-arm64': 0.34.2
|
||||||
'@img/sharp-linuxmusl-x64': 0.34.2
|
'@img/sharp-linuxmusl-x64': 0.34.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
@ -6,8 +6,6 @@ packages:
|
|||||||
- server
|
- server
|
||||||
- web
|
- web
|
||||||
- .github
|
- .github
|
||||||
|
|
||||||
|
|
||||||
ignoredBuiltDependencies:
|
ignoredBuiltDependencies:
|
||||||
- '@nestjs/core'
|
- '@nestjs/core'
|
||||||
- '@scarf/scarf'
|
- '@scarf/scarf'
|
||||||
@ -24,28 +22,12 @@ ignoredBuiltDependencies:
|
|||||||
- protobufjs
|
- protobufjs
|
||||||
- ssh2
|
- ssh2
|
||||||
- utimes
|
- utimes
|
||||||
|
|
||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
- sharp
|
- sharp
|
||||||
- '@tailwindcss/oxide'
|
- '@tailwindcss/oxide'
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
canvas: 2.11.2
|
canvas: 2.11.2
|
||||||
sharp: ^0.34.2
|
sharp: ^0.34.2
|
||||||
'@img/sharp-darwin-arm64': '-'
|
|
||||||
'@img/sharp-darwin-x64': '-'
|
|
||||||
'@img/sharp-libvips-darwin-arm64': '-'
|
|
||||||
'@img/sharp-libvips-darwin-x64': '-'
|
|
||||||
'@img/sharp-libvips-linux-ppc64': '-'
|
|
||||||
'@img/sharp-libvips-linux-s390x': '-'
|
|
||||||
'@img/sharp-libvips-linuxmusl-arm64': '-'
|
|
||||||
'@img/sharp-linux-s390x': '-'
|
|
||||||
'@img/sharp-linuxmusl-arm64': '-'
|
|
||||||
'@img/sharp-wasm32': '-'
|
|
||||||
'@img/sharp-win32-arm64': '-'
|
|
||||||
'@img/sharp-win32-ia32': '-'
|
|
||||||
'@img/sharp-win32-x64': '-'
|
|
||||||
|
|
||||||
packageExtensions:
|
packageExtensions:
|
||||||
nestjs-kysely:
|
nestjs-kysely:
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -65,13 +47,11 @@ packageExtensions:
|
|||||||
node-gyp: '*'
|
node-gyp: '*'
|
||||||
'@immich/ui':
|
'@immich/ui':
|
||||||
dependencies:
|
dependencies:
|
||||||
tailwindcss: ^4.1.11
|
tailwindcss: '>=4.1'
|
||||||
tailwind-variants:
|
tailwind-variants:
|
||||||
dependencies:
|
dependencies:
|
||||||
tailwindcss: ^4.1.11
|
tailwindcss: '>=4.1'
|
||||||
|
|
||||||
dedupePeerDependents: false
|
dedupePeerDependents: false
|
||||||
packageImportMethod: hardlink
|
|
||||||
preferWorkspacePackages: true
|
preferWorkspacePackages: true
|
||||||
injectWorkspacePackages: true
|
injectWorkspacePackages: true
|
||||||
shamefullyHoist: false
|
shamefullyHoist: false
|
||||||
|
@ -5,11 +5,18 @@ ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \
|
|||||||
CI=1 \
|
CI=1 \
|
||||||
COREPACK_HOME=/tmp
|
COREPACK_HOME=/tmp
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
RUN npm install --global corepack@latest && \
|
RUN npm install --global corepack@latest && \
|
||||||
corepack enable pnpm && \
|
corepack enable pnpm && \
|
||||||
pnpm config set store-dir /buildcache/pnpm-store
|
echo "store-dir=/buildcache/pnpm-store" >> /usr/local/etc/npmrc && \
|
||||||
|
echo "devdir=/buildcache/node-gyp" >> /usr/local/etc/npmrc
|
||||||
|
|
||||||
|
COPY ./package* ./pnpm* .pnpmfile.cjs /tmp/create-dep-cache/
|
||||||
|
COPY ./web/package* ./web/pnpm* /tmp/create-dep-cache/web/
|
||||||
|
COPY ./server/package* ./server/pnpm* /tmp/create-dep-cache/server/
|
||||||
|
COPY ./open-api/typescript-sdk/package* ./open-api/typescript-sdk/pnpm* /tmp/create-dep-cache/open-api/typescript-sdk/
|
||||||
|
WORKDIR /tmp/create-dep-cache
|
||||||
|
RUN pnpm fetch && rm -rf /tmp/create-dep-cache && chmod -R o+rw /buildcache
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
ENV PATH="${PATH}:/usr/src/app/server/bin" \
|
ENV PATH="${PATH}:/usr/src/app/server/bin" \
|
||||||
IMMICH_ENV=development \
|
IMMICH_ENV=development \
|
||||||
@ -31,13 +38,6 @@ RUN usermod -aG sudo node && \
|
|||||||
RUN chown node:node -R /workspaces
|
RUN chown node:node -R /workspaces
|
||||||
COPY --chown=node:node --chmod=755 ../.devcontainer/server/*.sh /immich-devcontainer/
|
COPY --chown=node:node --chmod=755 ../.devcontainer/server/*.sh /immich-devcontainer/
|
||||||
|
|
||||||
|
|
||||||
COPY ./package* ./pnpm* .pnpmfile.cjs /tmp/create-dep-cache/
|
|
||||||
COPY ./web/package* ./web/pnpm* /tmp/create-dep-cache/web/
|
|
||||||
COPY ./server/package* ./server/pnpm* /tmp/create-dep-cache/server/
|
|
||||||
COPY ./open-api/typescript-sdk/package* ./open-api/typescript-sdk/pnpm* /tmp/create-dep-cache/open-api/typescript-sdk/
|
|
||||||
WORKDIR /tmp/create-dep-cache
|
|
||||||
RUN pnpm fetch && rm -rf /tmp/create-dep-cache
|
|
||||||
WORKDIR /workspaces/immich
|
WORKDIR /workspaces/immich
|
||||||
|
|
||||||
FROM dev-container-server AS dev-container-mobile
|
FROM dev-container-server AS dev-container-mobile
|
||||||
@ -67,28 +67,38 @@ RUN mkdir -p ${FLUTTER_HOME} \
|
|||||||
&& rm flutter.tar.xz \
|
&& rm flutter.tar.xz \
|
||||||
&& chown -R node ${FLUTTER_HOME}
|
&& chown -R node ${FLUTTER_HOME}
|
||||||
|
|
||||||
USER node
|
|
||||||
RUN sudo apt-get update \
|
RUN apt-get update \
|
||||||
&& wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg \
|
&& wget -qO- https://dcm.dev/pgp-key.public | gpg --dearmor -o /usr/share/keyrings/dcm.gpg \
|
||||||
&& echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list \
|
&& echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | tee /etc/apt/sources.list.d/dart_stable.list \
|
||||||
&& sudo apt-get update \
|
&& apt-get update \
|
||||||
&& sudo apt-get install dcm -y
|
&& apt-get install dcm -y
|
||||||
|
|
||||||
COPY --chmod=755 ../.devcontainer/mobile/container-mobile-post-create.sh /immich-devcontainer/container-mobile-post-create.sh
|
COPY --chmod=755 ../.devcontainer/mobile/container-mobile-post-create.sh /immich-devcontainer/container-mobile-post-create.sh
|
||||||
|
|
||||||
RUN dart --disable-analytics
|
RUN dart --disable-analytics
|
||||||
|
|
||||||
|
# production-builder-base image
|
||||||
|
FROM ghcr.io/immich-app/base-server-dev:202507291116@sha256:e38543bdd77a02ed156cd9175ed11e9c16dccf48c418d46ecda48ce684de456a AS prod-builder-base
|
||||||
|
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \
|
||||||
|
CI=1 \
|
||||||
|
COREPACK_HOME=/tmp
|
||||||
|
|
||||||
|
RUN npm install --global corepack@latest && \
|
||||||
|
corepack enable pnpm
|
||||||
|
|
||||||
# server production build
|
# server production build
|
||||||
FROM dev AS server-prod
|
FROM prod-builder-base AS server-prod
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
||||||
COPY ./server ./server/
|
COPY ./server ./server/
|
||||||
|
# SHARP_IGNORE_GLOBAL_LIBVIPS because 'deploy' will always build sharp bindings from source
|
||||||
RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich --frozen-lockfile build && \
|
RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter immich --frozen-lockfile build && \
|
||||||
pnpm --filter immich --frozen-lockfile --prod --no-optional deploy /output/server-pruned
|
pnpm --filter immich --frozen-lockfile --prod --no-optional deploy /output/server-pruned
|
||||||
|
|
||||||
# web production build
|
# web production build
|
||||||
FROM dev AS web-prod
|
FROM prod-builder-base AS web-prod
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
||||||
@ -98,7 +108,7 @@ COPY ./open-api ./open-api/
|
|||||||
RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install && \
|
RUN SHARP_IGNORE_GLOBAL_LIBVIPS=true pnpm --filter @immich/sdk --filter immich-web --frozen-lockfile --force install && \
|
||||||
pnpm --filter @immich/sdk --filter immich-web build
|
pnpm --filter @immich/sdk --filter immich-web build
|
||||||
|
|
||||||
FROM dev AS cli-prod
|
FROM prod-builder-base AS cli-prod
|
||||||
|
|
||||||
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
COPY ./package* ./pnpm* .pnpmfile.cjs ./
|
||||||
COPY ./cli ./cli/
|
COPY ./cli ./cli/
|
||||||
@ -107,7 +117,7 @@ RUN pnpm --filter @immich/sdk --filter @immich/cli --frozen-lockfile install &&
|
|||||||
pnpm --filter @immich/sdk --filter @immich/cli build && \
|
pnpm --filter @immich/sdk --filter @immich/cli build && \
|
||||||
pnpm --filter @immich/cli --prod --no-optional deploy /output/cli-pruned
|
pnpm --filter @immich/cli --prod --no-optional deploy /output/cli-pruned
|
||||||
|
|
||||||
# prod build
|
# prod base image
|
||||||
FROM ghcr.io/immich-app/base-server-prod:202507291116@sha256:6e80f884c6e4f05cefe4b4fc4cc06a15bdb6ec9bd7b6e9eadf996a13b69494b6
|
FROM ghcr.io/immich-app/base-server-prod:202507291116@sha256:6e80f884c6e4f05cefe4b4fc4cc06a15bdb6ec9bd7b6e9eadf996a13b69494b6
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
@ -6,7 +6,7 @@ ENV CHOKIDAR_USEPOLLING=true \
|
|||||||
|
|
||||||
RUN npm install --global corepack@latest && \
|
RUN npm install --global corepack@latest && \
|
||||||
corepack enable && corepack install -g pnpm && \
|
corepack enable && corepack install -g pnpm && \
|
||||||
apk add --no-cache tini make bash&& \
|
apk add --no-cache tini make bash && \
|
||||||
mkdir -p /buildcache/pnpm-store && \
|
mkdir -p /buildcache/pnpm-store && \
|
||||||
pnpm config set store-dir /buildcache/pnpm-store
|
pnpm config set store-dir /buildcache/pnpm-store
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"lint:fix": "npm run lint -- --fix",
|
"lint:fix": "npm run lint -- --fix",
|
||||||
"format": "prettier --check .",
|
"format": "prettier --check .",
|
||||||
"format:fix": "prettier --write . && npm run format:i18n",
|
"format:fix": "prettier --write . && npm run format:i18n",
|
||||||
"format:i18n": "npx --yes sort-json ../i18n/*.json",
|
"format:i18n": "pnpx sort-json ../i18n/*.json",
|
||||||
"test": "vitest --run",
|
"test": "vitest --run",
|
||||||
"test:cov": "vitest --coverage",
|
"test:cov": "vitest --coverage",
|
||||||
"test:watch": "vitest dev",
|
"test:watch": "vitest dev",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user