feat: upgrade immich to 1.118.2
Infrastructure / Check and run Ansbile playbooks (push) Failing after 2m32s Details

This commit is contained in:
Gleb Koval 2024-12-14 01:33:59 +00:00
parent 42326a0e31
commit 3494ffcb69
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
3 changed files with 43 additions and 22 deletions

View File

@ -7,21 +7,22 @@
- name: Wait for connection - name: Wait for connection
ansible.builtin.wait_for_connection: ansible.builtin.wait_for_connection:
timeout: 300 timeout: 300
- name: Get user
ansible.builtin.user:
name: debian
register: user
- name: Check if project exists
ansible.builtin.stat:
path: "$HOME/{{ app }}"
register: project
- name: Docker compose down - name: Docker compose down
ansible.builtin.command: docker compose down when: project.stat.exists
args: community.docker.docker_compose_v2:
chdir: "{{ user.home }}/{{ app }}" project_src: "$HOME/{{ app }}"
ignore_errors: true state: absent
- name: Copy project - name: Copy project
ansible.builtin.copy: ansible.builtin.copy:
src: "./{{ app }}" src: "./{{ app }}"
dest: "{{ user.home }}" dest: "$HOME"
mode: "0744" mode: "0744"
- name: Replace Typesense secret - name: Replace Typesense secret
ansible.builtin.replace: ansible.builtin.replace:
path: "{{ user.home }}/{{ app }}/.env" path: "{{ user.home }}/{{ app }}/.env"
@ -36,11 +37,8 @@
replace: replace:
"{{ lookup('infisical.vault.read_secrets', project_id=infisical_project, env_slug='prod', "{{ lookup('infisical.vault.read_secrets', project_id=infisical_project, env_slug='prod',
path='/photos', secret_name='DB_PASSWORD')['value'] }}" path='/photos', secret_name='DB_PASSWORD')['value'] }}"
- name: Docker compose pull
ansible.builtin.command: docker compose pull - name: Docker compose up
args: community.docker.docker_compose_v2:
chdir: "{{ user.home }}/{{ app }}" pull: always
- name: Docker compose up -d project_src: "$HOME/{{ app }}"
ansible.builtin.command: docker compose up -d
args:
chdir: "{{ user.home }}/{{ app }}"

View File

@ -4,7 +4,7 @@
UPLOAD_LOCATION=/mnt/media/immich UPLOAD_LOCATION=/mnt/media/immich
# The Immich version to use. You can pin this to a specific version like "v1.71.0" # The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release IMMICH_VERSION=v1.118.2
# Connection secrets for postgres and typesense. You should change these to random passwords # Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=TYPESENSE_API_KEY_VALUE TYPESENSE_API_KEY=TYPESENSE_API_KEY_VALUE

View File

@ -3,14 +3,14 @@ version: "3.8"
services: services:
immich-server: immich-server:
container_name: immich_server container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION}
volumes: volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload - ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
env_file: env_file:
- .env - .env
ports: ports:
- 2283:3001 - 2283:2283
depends_on: depends_on:
- redis - redis
- database - database
@ -18,7 +18,7 @@ services:
immich-machine-learning: immich-machine-learning:
container_name: immich_machine_learning container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION}
volumes: volumes:
- model-cache:/cache - model-cache:/cache
env_file: env_file:
@ -27,7 +27,9 @@ services:
redis: redis:
container_name: immich_redis container_name: immich_redis
image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 image: redis:6.2-alpine@sha256:2ba50e1ac3a0ea17b736ce9db2b0a9f6f8b85d4c27d5f5accc6a416d8f42c6d5
healthcheck:
test: redis-cli ping || exit 1
restart: always restart: always
database: database:
@ -41,6 +43,27 @@ services:
POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_DB: ${DB_DATABASE_NAME}
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
healthcheck:
test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command:
[
'postgres',
'-c',
'shared_preload_libraries=vectors.so',
'-c',
'search_path="$$user", public, vectors',
'-c',
'logging_collector=on',
'-c',
'max_wal_size=2GB',
'-c',
'shared_buffers=512MB',
'-c',
'wal_compression=on',
]
restart: always restart: always
volumes: volumes: