Tywele

joined 1 year ago
[–] Tywele@lemmy.dbzer0.com 1 points 6 months ago

I know but I also learned that it's generally better to use the specific module for the package manager (just can't remember why from the top of my head) and I never intended this playbook to be generally usable.

[–] Tywele@lemmy.dbzer0.com 2 points 6 months ago

The apps service just borked itself and I couldn't get it to properly start anymore. Also deploying apps always took a ridiculously and annoyingly long time (like about 15 minutes to deploy NPM).

[–] Tywele@lemmy.dbzer0.com 2 points 6 months ago

Thank you! 🙂

[–] Tywele@lemmy.dbzer0.com 3 points 6 months ago (2 children)

It should be pretty easy to adapt it for Debian. The only thing you need to change as far as I can see is the usage of the dnf module to the apt module.

[–] Tywele@lemmy.dbzer0.com 6 points 6 months ago

If you look inside the file you will see that it's an encrypted file created via ansible-vault

[–] Tywele@lemmy.dbzer0.com 1 points 6 months ago* (last edited 6 months ago)

I added the REDIS_HOSTNAME and DB_DATA_LOCATION environment variables. Not sure if I understood it right, but I guess not since it still doesn't work:

Ansible tasks

- name: create Immich network
  community.docker.docker_network:
    name: immich-network
    state: present

- name: deploy Immich-Redis
  community.docker.docker_container:
    name: immich-redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    restart_policy: always
    networks: 
      - name: immich-network
    env:
      DB_DATABASE_NAME: "{{ immich_postgres_db_name }}"
      DB_USERNAME: "{{ immich_postgres_db_user }}"
      DB_PASSWORD: "{{ immich_postgres_db_password }}"
      DB_DATA_LOCATION: "{{ nvme_mount_point }}/immich/postgres"

- name: deploy Immich-Postgres
  community.docker.docker_container:
    name: immich-postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    restart_policy: always
    volumes:
      - "{{ nvme_mount_point }}/immich/postgres:/var/lib/postgresql/data"
    env:
      POSTGRES_DB: "{{ immich_postgres_db_name }}"
      POSTGRES_USER: "{{ immich_postgres_db_user }}"
      POSTGRES_PASSWORD: "{{ immich_postgres_db_password }}"
      REDIS_HOSTNAME: immich-redis
    networks: 
      - name: immich-network

- name: deploy Immich-Machine-Learning
  community.docker.docker_container:
    name: immich-machine-learning
    image: ghcr.io/immich-app/immich-machine-learning:release
    restart_policy: always
    volumes:
      - "{{ nvme_mount_point }}/immich/model-cache:/cache"
    networks: 
      - name: immich-network
    env:
      DB_DATABASE_NAME: "{{ immich_postgres_db_name }}"
      DB_USERNAME: "{{ immich_postgres_db_user }}"
      DB_PASSWORD: "{{ immich_postgres_db_password }}"
      DB_DATA_LOCATION: "{{ nvme_mount_point }}/immich/postgres"
      REDIS_HOSTNAME: immich-redis

- name: deploy Immich-Microservices
  community.docker.docker_container:
    name: immich-microservices
    image: ghcr.io/immich-app/immich-server:release
    restart_policy: always
    command: ['start.sh', 'microservices']
    volumes:
      - "{{ hdd_mount_point}}/immich/library:/usr/src/app/upload"
      - /etc/localtime:/etc/localtime:ro
    networks: 
      - name: immich-network
    env:
      DB_DATABASE_NAME: "{{ immich_postgres_db_name }}"
      DB_USERNAME: "{{ immich_postgres_db_user }}"
      DB_PASSWORD: "{{ immich_postgres_db_password }}"
      DB_DATA_LOCATION: "{{ nvme_mount_point }}/immich/postgres"
      REDIS_HOSTNAME: immich-redis

- name: deploy Immich-Server
  community.docker.docker_container:
    name: immich-server
    image: ghcr.io/immich-app/immich-server:release
    restart_policy: always
    command: ['start.sh', 'immich']
    volumes:
      - "{{ hdd_mount_point}}/immich/library:/usr/src/app/upload"
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "2283:3001"
    networks: 
      - name: immich-network
    env:
      DB_DATABASE_NAME: "{{ immich_postgres_db_name }}"
      DB_USERNAME: "{{ immich_postgres_db_user }}"
      DB_PASSWORD: "{{ immich_postgres_db_password }}"
      DB_DATA_LOCATION: "{{ nvme_mount_point }}/immich/postgres"
      REDIS_HOSTNAME: immich-redis

This is what I have now and I get the following error in immich-server and immich-microservices:

[Nest] 7  - 05/02/2024, 3:45:01 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
Error: getaddrinfo ENOTFOUND database
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:118:26)

Edit: It works! I forgot to add DB_HOSTNAME

[–] Tywele@lemmy.dbzer0.com 2 points 6 months ago* (last edited 6 months ago) (3 children)

This confuses me because the default docker-compose.yml from Immich doesn't set these environment variables.

[–] Tywele@lemmy.dbzer0.com 7 points 6 months ago (1 children)

I just found it weird that one of the most popular distros doesn't have a package for it.

[–] Tywele@lemmy.dbzer0.com 2 points 6 months ago (3 children)

Does it not have a Fedora package or is it just not listed on the GitHub page?

[–] Tywele@lemmy.dbzer0.com 5 points 6 months ago (1 children)

I recently began learning Ansible and this playlist was very helpful with learning.

[–] Tywele@lemmy.dbzer0.com 2 points 7 months ago (2 children)

That was about remembering the window position not the size but maybe it can be adapted.

[–] Tywele@lemmy.dbzer0.com 9 points 7 months ago

Most of the time transphobic comments are pretty clear cut including yours.

view more: ‹ prev next ›