Closed github-actions[bot] closed 8 months ago
This PR bumps the version from v1.91.4 to v1.92.1. Please review the changes and merge this PR if everything looks good.
diff --git a/server/src/infra/migrations/1700713871511-UsePgVectors.ts b/server/src/infra/migrations/1700713871511-UsePgVectors.ts index 9b13f836..9f8a72cf 100644 --- a/server/src/infra/migrations/1700713871511-UsePgVectors.ts +++ b/server/src/infra/migrations/1700713871511-UsePgVectors.ts @@ -1,13 +1,11 @@ import { getCLIPModelInfo } from '@app/domain/smart-info/smart-info.constant'; import { MigrationInterface, QueryRunner } from 'typeorm'; -import { assertVectors } from '../database.config'; export class UsePgVectors1700713871511 implements MigrationInterface { name = 'UsePgVectors1700713871511'; public async up(queryRunner: QueryRunner): Promise<void> { - await assertVectors(queryRunner); - + await queryRunner.query(`CREATE EXTENSION IF NOT EXISTS vectors`); const faceDimQuery = await queryRunner.query(` SELECT CARDINALITY(embedding::real[]) as dimsize FROM asset_faces diff --git a/server/src/infra/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts b/server/src/infra/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts new file mode 100644 index 00000000..c646287c --- /dev/null +++ b/server/src/infra/migrations/1702938928766-NullifyFutureBirthDatesAndAddCheckConstraint.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class NullifyFutureBirthDatesAndAddCheckConstraint1702938928766 implements MigrationInterface { + name = 'NullifyFutureBirthDatesAndAddCheckConstraint1702938928766' + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`UPDATE "person" SET "birthDate" = NULL WHERE "birthDate" > CURRENT_DATE;`); + await queryRunner.query(`ALTER TABLE "person" ADD CONSTRAINT "CHK_b0f82b0ed662bfc24fbb58bb45" CHECK ("birthDate" <= CURRENT_DATE)`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + // The down method cannot revert the nullified dates + await queryRunner.query(`ALTER TABLE "person" DROP CONSTRAINT "CHK_b0f82b0ed662bfc24fbb58bb45"`); + } + +} diff --git a/server/src/infra/migrations/1702942303661-FixRemovedAssetsSharedLink.ts b/server/src/infra/migrations/1702942303661-FixRemovedAssetsSharedLink.ts new file mode 100644 index 00000000..a55b12fa --- /dev/null +++ b/server/src/infra/migrations/1702942303661-FixRemovedAssetsSharedLink.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class FixRemovedAssetsSharedLink1702942303661 implements MigrationInterface { + name = 'FixRemovedAssetsSharedLink1702942303661' + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "shared_link__asset" DROP CONSTRAINT "FK_c9fab4aa97ffd1b034f3d6581ab"`); + await queryRunner.query(`ALTER TABLE "shared_link__asset" ADD CONSTRAINT "FK_c9fab4aa97ffd1b034f3d6581ab" FOREIGN KEY ("sharedLinksId") REFERENCES "shared_links"("id") ON DELETE CASCADE ON UPDATE CASCADE`); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`ALTER TABLE "shared_link__asset" DROP CONSTRAINT "FK_c9fab4aa97ffd1b034f3d6581ab"`); + await queryRunner.query(`ALTER TABLE "shared_link__asset" ADD CONSTRAINT "FK_c9fab4aa97ffd1b034f3d6581ab" FOREIGN KEY ("sharedLinksId") REFERENCES "shared_links"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); + } + +} diff --git a/server/src/infra/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts b/server/src/infra/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts new file mode 100644 index 00000000..4ea88db8 --- /dev/null +++ b/server/src/infra/migrations/1703288449127-DefaultStorageTemplateOnForExistingInstallations.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm" + +export class DefaultStorageTemplateOnForExistingInstallations1703288449127 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise<void> { + const adminCount = await queryRunner.query(`SELECT COUNT(*) FROM users WHERE "isAdmin" = true`) + if(adminCount[0].count > 0) { + await queryRunner.query(`INSERT INTO system_config (key, value) VALUES ('storageTemplate.enabled', 'true')`) + } + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`DELETE FROM system_config WHERE key = 'storageTemplate.enabled'`) + } + +} diff --git a/server/src/infra/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts b/server/src/infra/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts new file mode 100644 index 00000000..cba248b5 --- /dev/null +++ b/server/src/infra/migrations/1704571051932-DefaultOnboardingForExistingInstallations.ts @@ -0,0 +1,17 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class DefaultOnboardingForExistingInstallations1704571051932 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise<void> { + const adminCount = await queryRunner.query(`SELECT COUNT(*) FROM users WHERE "isAdmin" = true`); + if (adminCount[0].count > 0) { + await queryRunner.query(`INSERT INTO system_metadata (key, value) VALUES ($1, $2)`, [ + 'admin-onboarding', + '"{\\"isOnboarded\\":true}"', + ]); + } + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(`DELETE FROM system_metadata WHERE key = 'admin-onboarding'`); + } +}
diff --git a/server/Dockerfile b/server/Dockerfile index 3c2a0522..9401e010 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,5 +1,5 @@ # dev build -FROM ghcr.io/immich-app/base-server-dev:20231214@sha256:cd5be516b27c0c402bee3a6a93d8c83dfd5a827c18a2343cb97b55f3be98151b as dev +FROM ghcr.io/immich-app/base-server-dev:20240105@sha256:d88528d55ef13a5df37e141fdb3e00834a4a4673d1cfa243ac999cf87ed79eb6 as dev RUN apt-get install --no-install-recommends -yqq tini WORKDIR /usr/src/app @@ -10,7 +10,10 @@ RUN npm ci && \ rm -rf node_modules/@img/sharp-libvips* && \ rm -rf node_modules/@img/sharp-linuxmusl-x64 COPY server . -ENV PATH="${PATH}:/usr/src/app/bin" +ENV PATH="${PATH}:/usr/src/app/bin" \ + NODE_ENV=development \ + NVIDIA_DRIVER_CAPABILITIES=all \ + NVIDIA_VISIBLE_DEVICES=all ENTRYPOINT ["tini", "--", "/bin/sh"] @@ -31,10 +34,12 @@ RUN npm run build # prod build -FROM ghcr.io/immich-app/base-server-prod:20231214@sha256:b214f86683fde081b09beed2d7bfc28bec55c829751ccf2e02ad7dd18293f5e0 +FROM ghcr.io/immich-app/base-server-prod:20240105@sha256:0472a2689e3d95a498bc0a424c63650cdad446c2959cc91cdf7771ee832ccadc WORKDIR /usr/src/app -ENV NODE_ENV=production +ENV NODE_ENV=production \ + NVIDIA_DRIVER_CAPABILITIES=all \ + NVIDIA_VISIBLE_DEVICES=all COPY --from=prod /usr/src/app/node_modules ./node_modules COPY --from=prod /usr/src/app/dist ./dist COPY --from=prod /usr/src/app/bin ./bin
diff --git a/machine-learning/README.md b/machine-learning/README.md index cb1aa431..ad06f009 100644 --- a/machine-learning/README.md +++ b/machine-learning/README.md @@ -1,6 +1,5 @@ # Immich Machine Learning -- Image classification - CLIP embeddings - Facial recognition
diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile index 81a7be58..f0c22149 100644 --- a/machine-learning/Dockerfile +++ b/machine-learning/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-bookworm@sha256:ba7a7ac30c38e119c4304f98ef0e188f90f4f67a958bb6899da9defb99bfb471 as builder +FROM python:3.11-bookworm@sha256:291405e32318285d8913b7b03293777c255fb1e89305c82aa495ac747b0049fe as builder ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ @@ -13,7 +13,7 @@ ENV VIRTUAL_ENV="/opt/venv" PATH="/opt/venv/bin:${PATH}" COPY poetry.lock pyproject.toml ./ RUN poetry install --sync --no-interaction --no-ansi --no-root --only main -FROM python:3.11-slim-bookworm@sha256:cfd7ed5c11a88ce533d69a1da2fd932d647f9eb6791c5b4ddce081aedf7f7876 +FROM python:3.11-slim-bookworm@sha256:8f64a67710f3d981cf3008d6f9f1dbe61accd7927f165f4e37ea3f8b883ccc3f RUN apt-get update && apt-get install -y --no-install-recommends tini libmimalloc2.0 && rm -rf /var/lib/apt/lists/*
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 909c0238..d05b3bcc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -55,7 +55,7 @@ services: redis: container_name: immich_redis - image: redis:6.2-alpine@sha256:b6124ab2e45cc332e16398022a411d7e37181f21ff7874835e0180f56a09e82a + image: redis:6.2-alpine@sha256:c5a607fb6e1bb15d32bbcf14db22787d19e428d59e31a5da67511b49bb0f1ccc restart: always database:
diff --git a/docs/docs/install/environment-variables.md b/docs/docs/install/environment-variables.md index 20966cfd..90085011 100644 --- a/docs/docs/install/environment-variables.md +++ b/docs/docs/install/environment-variables.md @@ -31,14 +31,14 @@ These environment variables are used by the `docker-compose.yml` file and do **N ## General | Variable | Description | Default | Services | -| :-------------------------- | :------------------------------------------- | :-----------------: | :------------------------------------------- | +| :------------------------------ | :------------------------------------------- | :------------------: | :------------------------------------------- | | `TZ` | Timezone | | microservices | | `NODE_ENV` | Environment (production, development) | `production` | server, microservices, machine learning, web | | `LOG_LEVEL` | Log Level (verbose, debug, log, warn, error) | `log` | server, microservices | | `IMMICH_MEDIA_LOCATION` | Media Location | `./upload` | server, microservices | -| `PUBLIC_LOGIN_PAGE_MESSAGE` | Public Login Page Message | | web | | `IMMICH_CONFIG_FILE` | Path to config file | | server | -| `IMMICH_WEB_ROOT` | Path of root index.html | `/usr/src/app/www'` | server | +| `IMMICH_WEB_ROOT` | Path of root index.html | `/usr/src/app/www` | server | +| `IMMICH_REVERSE_GEOCODING_ROOT` | Path of reverse geocoding dump directory | `/usr/src/resources` | microservices | :::tip @@ -48,12 +48,6 @@ These environment variables are used by the `docker-compose.yml` file and do **N ::: -## Geocoding - -| Variable | Description | Default | Services | -| :--------------------------------- | :------------------------------- | :--------------------------: | :------------ | -| `REVERSE_GEOCODING_DUMP_DIRECTORY` | Reverse Geocoding Dump Directory | `./.reverse-geocoding-dump/` | microservices | - ## Ports | Variable | Description | Default | Services |
/home/runner/work/immich-distribution/immich-distribution /tmp/tmp.gQCoicyBf7 removed
ref #147
This PR bumps the version from v1.91.4 to v1.92.1. Please review the changes and merge this PR if everything looks good.
Upstream release notes
Monitored upstream files
/home/runner/work/immich-distribution/immich-distribution /tmp/tmp.gQCoicyBf7 removed
Checklist
ref #147