Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/immich-app/immich into feat…
Browse files Browse the repository at this point in the history
…/inline-offline-check
  • Loading branch information
etnoy committed Jan 14, 2025
2 parents f588e00 + 5d2e421 commit 4d1dd39
Show file tree
Hide file tree
Showing 101 changed files with 2,945 additions and 1,960 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
library
14 changes: 14 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
ARG BASEIMAGE=mcr.microsoft.com/devcontainers/typescript-node:22@sha256:9791f4aa527774bc370c6bd2f6705ce5a686f1e6f204badd8dfaacce28c631ae
FROM ${BASEIMAGE}

# Flutter SDK
# https://flutter.dev/docs/development/tools/sdk/releases?tab=linux
ENV FLUTTER_CHANNEL="stable"
ENV FLUTTER_VERSION="3.24.5"
ENV FLUTTER_HOME=/flutter
ENV PATH=${PATH}:${FLUTTER_HOME}/bin

# Flutter SDK
RUN mkdir -p ${FLUTTER_HOME} \
&& curl -C - --output flutter.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/${FLUTTER_CHANNEL}/linux/flutter_linux_${FLUTTER_VERSION}-${FLUTTER_CHANNEL}.tar.xz \
&& tar -xf flutter.tar.xz --strip-components=1 -C ${FLUTTER_HOME} \
&& rm flutter.tar.xz \
&& chown -R 1000:1000 ${FLUTTER_HOME}
42 changes: 24 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
{
"name": "Immich devcontainers",
"build": {
"dockerfile": "Dockerfile",
"args": {
"BASEIMAGE": "mcr.microsoft.com/devcontainers/typescript-node:22"
}
},
"customizations": {
"vscode": {
"extensions": [
"svelte.svelte-vscode"
]
}
},
"forwardPorts": [],
"postCreateCommand": "make install-all",
"remoteUser": "node"
"name": "Immich",
"service": "immich-devcontainer",
"dockerComposeFile": [
"docker-compose.yml",
"../docker/docker-compose.dev.yml"
],
"customizations": {
"vscode": {
"extensions": [
"Dart-Code.dart-code",
"Dart-Code.flutter",
"dbaeumer.vscode-eslint",
"dcmdev.dcm-vscode-extension",
"esbenp.prettier-vscode",
"svelte.svelte-vscode"
]
}
},
"forwardPorts": [],
"initializeCommand": "bash .devcontainer/scripts/initializeCommand.sh",
"onCreateCommand": "bash .devcontainer/scripts/onCreateCommand.sh",
"overrideCommand": true,
"workspaceFolder": "/immich",
"remoteUser": "node"
}

8 changes: 8 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
immich-devcontainer:
build:
dockerfile: Dockerfile
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- ..:/immich:cached
6 changes: 6 additions & 0 deletions .devcontainer/scripts/initializeCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# If .env file does not exist, create it by copying example.env from the docker folder
if [ ! -f ".devcontainer/.env" ]; then
cp docker/example.env .devcontainer/.env
fi
25 changes: 25 additions & 0 deletions .devcontainer/scripts/onCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Enable multiarch for arm64 if necessary
if [ "$(dpkg --print-architecture)" = "arm64" ]; then
sudo dpkg --add-architecture amd64 && \
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
qemu-user-static \
libc6:amd64 \
libstdc++6:amd64 \
libgcc1:amd64
fi

# Install DCM
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
sudo 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

sudo apt-get update
sudo apt-get install dcm

dart --disable-analytics

# Install immich
cd /immich || exit
make install-all
2 changes: 1 addition & 1 deletion cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:22.12.0-alpine3.20@sha256:96cc8323e25c8cc6ddcb8b965e135cfd57846e8003ec0d7bcec16c5fd5f6d39f AS core
FROM node:22.13.0-alpine3.20@sha256:db8dcb90326a0116375414e9a7c068a6b87a4422b7da37b5c6cd026f7c7835d3 AS core

WORKDIR /usr/src/open-api/typescript-sdk
COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ services:
- ../web:/usr/src/app
- ../i18n:/usr/src/i18n
- ../open-api/:/usr/src/open-api/
# - ../../ui:/usr/ui
- /usr/src/app/node_modules
ulimits:
nofile:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:

redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
image: docker.io/redis:6.2-alpine@sha256:905c4ee67b8e0aa955331960d2aa745781e6bd89afc44a8584bfd13bc890f0ae
healthcheck:
test: redis-cli ping || exit 1
restart: always
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/FAQ.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ A result of `on` means that checksums are enabled.
<summary>Check if checksums are enabled</summary>

```bash
docker exec -it immich_postgres psql --dbname=immich --username=<DB_USERNAME> --command="show data_checksums"
docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="show data_checksums"
data_checksums
----------------
on
Expand All @@ -440,7 +440,7 @@ If checksums are enabled, you can check the status of the database with the foll
<summary>Check for database corruption</summary>

```bash
docker exec -it immich_postgres psql --dbname=immich --username=<DB_USERNAME> --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"
docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"
datname | checksum_failures | checksum_last_failure
-----------+-------------------+-----------------------
postgres | 0 |
Expand Down
24 changes: 12 additions & 12 deletions docs/docs/administration/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip < "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --username=postgres # Restore Backup
| docker exec -i immich_postgres psql --dbname=postgres --username=<DB_USERNAME> # Restore Backup
docker compose up -d # Start remainder of Immich apps
```

Expand All @@ -70,18 +70,18 @@ docker compose up -d # Start remainder of Immich apps
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
## You should mount the backup (as a volume, example: - 'C:\path\to\backup\dump.sql':/dump.sql) into the immich_postgres container using the docker-compose.yml
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
# Check the database user if you deviated from the default
cat "/dump.sql" \
## You should mount the backup (as a volume, example: `- 'C:\path\to\backup\dump.sql:/dump.sql'`) into the immich_postgres container using the docker-compose.yml
docker compose pull # Update to latest version of Immich (if desired)
docker compose create # Create Docker containers for Immich apps without running them
docker start immich_postgres # Start Postgres server
sleep 10 # Wait for Postgres server to start up
docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
# Check the database user if you deviated from the default. If your backup ends in `.gz`, replace `cat` with `gunzip`
cat < "/dump.sql" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| psql --username=postgres # Restore Backup
exit # Exit the Docker shell
docker compose up -d # Start remainder of Immich apps
| psql --dbname=postgres --username=<DB_USERNAME> # Restore Backup
exit # Exit the Docker shell
docker compose up -d # Start remainder of Immich apps
```

</TabItem>
Expand Down
11 changes: 11 additions & 0 deletions docs/docs/developer/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ If you only want to do web development connected to an existing, remote backend,
IMMICH_SERVER_URL=https://demo.immich.app/ npm run dev
```

#### `@immich/ui`

To see local changes to `@immich/ui` in Immich, do the following:

1. Install `@immich/ui` as a sibling to `immich/`, for example `/home/user/immich` and `/home/user/ui`
1. Build the `@immich/ui` project via `npm run build`
1. Uncomment the corresponding volume in web service of the `docker/docker-compose.dev.yaml` file (`../../ui:/usr/ui`)
1. Uncomment the corresponding alias in the `web/vite.config.js` file (`'@immich/ui': path.resolve(\_\_dirname, '../../ui')`)
1. Start up the stack via `make dev`
1. After making changes in `@immich/ui`, rebuild it (`npm run build`)

### Mobile app

The mobile app `(/mobile)` will required Flutter toolchain 3.13.x to be installed on your system.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/database-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Keep in mind that mucking around in the database might set the moon on fire. Avo
:::

:::tip
Run `docker exec -it immich_postgres psql --dbname=immich --username=<DB_USERNAME>` to connect to the database via the container directly.
Run `docker exec -it immich_postgres psql --dbname=<DB_DATABASE_NAME> --username=<DB_USERNAME>` to connect to the database via the container directly.

(Replace `<DB_USERNAME>` with the value from your [`.env` file](/docs/install/environment-variables#database)).
(Replace `<DB_DATABASE_NAME>` and `<DB_USERNAME>` with the values from your [`.env` file](/docs/install/environment-variables#database)).
:::

## Assets
Expand Down
4 changes: 4 additions & 0 deletions e2e/src/api/specs/user.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ describe('/users', () => {
expect(body).toEqual({
...before,
updatedAt: expect.any(String),
profileChangedAt: expect.any(String),
createdAt: expect.any(String),
name: 'Name',
});
});
Expand Down Expand Up @@ -177,6 +179,8 @@ describe('/users', () => {
...before,
email: '[email protected]',
updatedAt: expect.anything(),
createdAt: expect.anything(),
profileChangedAt: expect.anything(),
});
});
});
Expand Down
22 changes: 13 additions & 9 deletions i18n/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@
"birthdate_set_description": "Датата на раждане се използва за изчисляване на възрастта на този човек към момента на снимката.",
"blurred_background": "Замъглен заден фон",
"bugs_and_feature_requests": "Бъгове и заявки за функции",
"build": "Създаване",
"build_image": "Създаване на изображение",
"build": "Версия",
"build_image": "Docker версия",
"bulk_delete_duplicates_confirmation": "Сигурни ли сте, че искате да изтриете масово {count, plural, one {# дублиран файл} other {# дублирани файла}}? Това ще запази най-големия файл от всяка група и ще изтрие трайно всички други дубликати. Не можете да отмените това действие!",
"bulk_keep_duplicates_confirmation": "Сигурни ли сте, че искате да запазите {count, plural, one {# дублиран файл} other {# дублирани файла}}? Това ще потвърди всички групи дубликати, без да изтрива нищо.",
"bulk_trash_duplicates_confirmation": "Сигурни ли сте, че искате да преместите в кошчето масово {count, plural, one {# дублиран файл} other {# дублирани файла}}? Това ще запази най-големия файл от всяка група и ще премести в кошчето всички други дубликати.",
Expand Down Expand Up @@ -523,6 +523,10 @@
"date_range": "Период от време",
"day": "Ден",
"deduplicate_all": "Дедупликиране на всички",
"deduplication_criteria_1": "Размер на снимката в байтове",
"deduplication_criteria_2": "Брой EXIF данни",
"deduplication_info": "Информация за дедупликацията",
"deduplication_info_description": "За автоматично предварително избиране на ресурси и премахване на дубликати на едро, разглеждаме:",
"default_locale": "Локализация по подразбиране",
"default_locale_description": "Форматиране на дати и числа в зависимост от местоположението на браузъра",
"delete": "Изтрий",
Expand Down Expand Up @@ -669,7 +673,7 @@
"unable_to_download_files": "Не могат да се изтеглят файловете",
"unable_to_edit_exclusion_pattern": "Не може да се редактира шаблон за изключване",
"unable_to_edit_import_path": "Пътят за импортиране не може да се редактира",
"unable_to_empty_trash": "Не може да изпразни кошчето",
"unable_to_empty_trash": "Неуспешно изпразване на кошчето",
"unable_to_enter_fullscreen": "Не може да се отвори в цял екран",
"unable_to_exit_fullscreen": "Не може да излезе от цял екран",
"unable_to_get_comments_number": "Не може да получи брой коментари",
Expand Down Expand Up @@ -765,7 +769,7 @@
"group_no": "Няма група",
"group_owner": "Групиране по собственик",
"group_year": "Групиране по година",
"has_quota": "Има лимит",
"has_quota": "Лимит",
"hi_user": "Здравей, {name} {email}",
"hide_all_people": "Скрий всички хора",
"hide_gallery": "Скрий галерия",
Expand Down Expand Up @@ -1009,7 +1013,7 @@
"purchase_button_select": "Избери",
"purchase_failed_activation": "Неуспешна активация! Моля, проверете имейла си за правилния продуктов ключ!",
"purchase_individual_description_1": "За индивидуален потребител",
"purchase_individual_description_2": "Поддръжнически статус",
"purchase_individual_description_2": "Статус на поддръжник",
"purchase_individual_title": "Индивидуален",
"purchase_input_suggestion": "Имате продуктов ключ? Въведете ключа по-долу",
"purchase_license_subtitle": "Закупете Immich, за да подкрепите продължаващото развитие на услугата",
Expand All @@ -1025,7 +1029,7 @@
"purchase_remove_server_product_key": "Премахни продуктовия ключ на сървъра",
"purchase_remove_server_product_key_prompt": "Сигурни ли сте, че искате да премахнете продуктовия ключ на сървъра?",
"purchase_server_description_1": "За целият сървър",
"purchase_server_description_2": "Статус на поддръжника",
"purchase_server_description_2": "Статус на поддръжник",
"purchase_server_title": "Сървър",
"purchase_settings_server_activated": "Продуктовият ключ на сървъра се управлява от администратора",
"rating": "Оценка със звезди",
Expand Down Expand Up @@ -1205,7 +1209,7 @@
"sort_people_by_similarity": "Сортиране на хора по прилика",
"sort_recent": "Най-новата снимка",
"sort_title": "Заглавие",
"source": "Източник",
"source": "Код",
"stack": "Събери",
"stack_duplicates": "Подреждане на дубликати",
"stack_select_one_photo": "Избери една главна снимка за събраните снимки",
Expand Down Expand Up @@ -1258,9 +1262,9 @@
"toggle_theme": "Превключване на тема",
"total": "Общо",
"total_usage": "Общо използвано",
"trash": "кошче",
"trash": "Кошче",
"trash_all": "Изхвърли всички",
"trash_count": "Кошче {count, number}",
"trash_count": "В Кошчето {count, number}",
"trash_delete_asset": "Вкарай в Кошчето/Изтрий елемент",
"trash_no_results_message": "Изтритите снимки и видеоклипове ще се показват тук.",
"trashed_items_will_be_permanently_deleted_after": "Изхвърлените в кошчето елементи ще бъдат изтрити за постоянно след {days, plural, one {# ден} other {# дни}}.",
Expand Down
5 changes: 4 additions & 1 deletion i18n/ca.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"about": "Sobre",
"about": "Quant a",
"account": "Compte",
"account_settings": "Configuració del compte",
"acknowledge": "D'acord",
Expand Down Expand Up @@ -523,6 +523,9 @@
"date_range": "Interval de dates",
"day": "Dia",
"deduplicate_all": "Desduplica-ho tot",
"deduplication_criteria_1": "Mida d'imatge en bytes",
"deduplication_criteria_2": "Quantitat de dades EXIF",
"deduplication_info_description": "Per preseleccionar recursos automàticament i eliminar els duplicats de manera massiva, ens fixem en:",
"default_locale": "Localització predeterminada",
"default_locale_description": "Format de dates i números segons la configuració del navegador",
"delete": "Esborra",
Expand Down
8 changes: 6 additions & 2 deletions i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@
"date_range": "Rozsah dat",
"day": "Den",
"deduplicate_all": "Odstranit všechny duplicity",
"deduplication_criteria_1": "Velikost obrázku v bajtech",
"deduplication_criteria_2": "Počet EXIF dat",
"deduplication_info": "Informace o deduplikaci",
"deduplication_info_description": "Pro automatický předvýběr položek a hromadné odstranění duplicit se zohledňuje:",
"default_locale": "Výchozí jazyk",
"default_locale_description": "Formátovat datumy a čísla podle místního prostředí prohlížeče",
"delete": "Smazat",
Expand Down Expand Up @@ -921,7 +925,7 @@
"oldest_first": "Nejstarší první",
"onboarding": "Zahájení",
"onboarding_privacy_description": "Následující (volitelné) funkce jsou závislé na externích službách a lze je kdykoli zakázat v nastavení správy.",
"onboarding_theme_description": "Zvolte si barevné téma pro svou instanci. Můžete to později změnit v nastavení.",
"onboarding_theme_description": "Zvolte si barevný motiv pro svou instanci. Můžete to později změnit v nastavení.",
"onboarding_welcome_description": "Nastavíme vaši instanci pomocí několika běžných nastavení.",
"onboarding_welcome_user": "Vítej, {user}",
"online": "Online",
Expand Down Expand Up @@ -1282,7 +1286,7 @@
"unselect_all": "Zrušit výběr všech",
"unselect_all_duplicates": "Zrušit výběr všech duplicit",
"unstack": "Zrušit seskupení",
"unstacked_assets_count": "{count, plural, one {Rozložena # položka} few {Rozloženy # položky} other {Rozloženo # položek}}",
"unstacked_assets_count": "{count, plural, one {Rozložená # položka} few {Rozložené # položky} other {Rozložených # položiek}}",
"untracked_files": "Nesledované soubory",
"untracked_files_decription": "Tyto soubory nejsou aplikaci známy. Mohou být výsledkem neúspěšných přesunů, přerušeného nahrávání nebo mohou zůstat pozadu kvůli chybě",
"up_next": "To je prozatím vše",
Expand Down
Loading

0 comments on commit 4d1dd39

Please sign in to comment.