From c540ba422203c7efbc1879deb24b4fdf18f6a3e1 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 21 Nov 2023 11:25:49 +0000 Subject: [PATCH 1/3] Immich breaking upgrade [1.88] --- .github/workflows/infra.yaml | 4 ++-- infra/photos/0004_immich_1.88.yaml | 26 ++++++++++++++++++++++++++ infra/photos/immich/docker-compose.yml | 23 ++--------------------- 3 files changed, 30 insertions(+), 23 deletions(-) create mode 100644 infra/photos/0004_immich_1.88.yaml diff --git a/.github/workflows/infra.yaml b/.github/workflows/infra.yaml index 0f51db8..e16d55a 100644 --- a/.github/workflows/infra.yaml +++ b/.github/workflows/infra.yaml @@ -11,8 +11,8 @@ on: - main env: - # DEPLOY: ${{ github.ref == 'refs/heads/main' && ((startsWith(github.event.head_commit.message, '[deploy-all]') && 'all') || ('some')) || 'none' }} - DEPLOY: all + DEPLOY: ${{ github.ref == 'refs/heads/main' && ((startsWith(github.event.head_commit.message, '[deploy-all]') && 'all') || ('some')) || 'none' }} + # DEPLOY: all jobs: ansible-playbooks: diff --git a/infra/photos/0004_immich_1.88.yaml b/infra/photos/0004_immich_1.88.yaml new file mode 100644 index 0000000..6241b31 --- /dev/null +++ b/infra/photos/0004_immich_1.88.yaml @@ -0,0 +1,26 @@ +- name: Deploy app + hosts: photos + gather_facts: false + vars: + app: immich + tasks: + - name: Wait for connection + ansible.builtin.wait_for_connection: + timeout: 300 + - name: Get user + ansible.builtin.user: + name: debian + register: user + - name: Docker compose down + ansible.builtin.command: docker compose down + args: + chdir: "{{ user.home }}/{{ app }}" + - name: Copy project + ansible.builtin.copy: + src: "./{{ app }}/docker-compose.yml" + dest: "{{ user.home }}/{{ app }}/docker-compose.yml" + mode: "0644" + - name: Docker compose up -d + ansible.builtin.command: docker compose up -d + args: + chdir: "{{ user.home }}/{{ app }}" diff --git a/infra/photos/immich/docker-compose.yml b/infra/photos/immich/docker-compose.yml index d967639..983f6ca 100644 --- a/infra/photos/immich/docker-compose.yml +++ b/infra/photos/immich/docker-compose.yml @@ -9,6 +9,8 @@ services: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env + ports: + - 2283:8080 depends_on: - redis - database @@ -41,13 +43,6 @@ services: - .env restart: always - immich-web: - container_name: immich_web - image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release} - env_file: - - .env - restart: always - typesense: container_name: immich_typesense image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd @@ -78,20 +73,6 @@ services: - pgdata:/var/lib/postgresql/data restart: always - immich-proxy: - container_name: immich_proxy - image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release} - environment: - # Make sure these values get passed through from the env file - - IMMICH_SERVER_URL - - IMMICH_WEB_URL - ports: - - 2283:8080 - depends_on: - - immich-server - - immich-web - restart: always - volumes: pgdata: model-cache: -- 2.40.1 From fea50c01332eb1c054308fc60f16bcb60913d8cd Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 21 Nov 2023 11:30:38 +0000 Subject: [PATCH 2/3] Fix immich_server port --- infra/photos/immich/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/photos/immich/docker-compose.yml b/infra/photos/immich/docker-compose.yml index 983f6ca..e28daa2 100644 --- a/infra/photos/immich/docker-compose.yml +++ b/infra/photos/immich/docker-compose.yml @@ -10,7 +10,7 @@ services: env_file: - .env ports: - - 2283:8080 + - 2283:3001 depends_on: - redis - database -- 2.40.1 From 894034b269b8e2031d43757725dea733b5cb259d Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 21 Nov 2023 11:32:51 +0000 Subject: [PATCH 3/3] docker compose pull --- infra/photos/0004_immich_1.88.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infra/photos/0004_immich_1.88.yaml b/infra/photos/0004_immich_1.88.yaml index 6241b31..0bbab65 100644 --- a/infra/photos/0004_immich_1.88.yaml +++ b/infra/photos/0004_immich_1.88.yaml @@ -20,6 +20,10 @@ src: "./{{ app }}/docker-compose.yml" dest: "{{ user.home }}/{{ app }}/docker-compose.yml" mode: "0644" + - name: Docker compose pull + ansible.builtin.command: docker compose pull + args: + chdir: "{{ user.home }}/{{ app }}" - name: Docker compose up -d ansible.builtin.command: docker compose up -d args: -- 2.40.1