diff --git a/infra/cloud/0000_proxmox_playbook.yaml b/infra/cloud/0000_proxmox_playbook.yaml index 7efb04a..c858234 100644 --- a/infra/cloud/0000_proxmox_playbook.yaml +++ b/infra/cloud/0000_proxmox_playbook.yaml @@ -93,6 +93,12 @@ backup: true storage: nvme size: 2048 + - name: Create media disk + community.general.proxmox_disk: + disk: scsi2 + backup: false + storage: zfs + size: 4096 - name: Update VM community.general.proxmox_kvm: update: true diff --git a/infra/cloud/0001_initialise_playbook.yaml b/infra/cloud/0001_initialise_playbook.yaml index c7a7e5e..50c90be 100644 --- a/infra/cloud/0001_initialise_playbook.yaml +++ b/infra/cloud/0001_initialise_playbook.yaml @@ -40,3 +40,25 @@ opts: rw,errors=remount-ro,x-systemd.growfs state: mounted become: true + + - name: Create media partition + community.general.parted: + device: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:2 + label: gpt + name: media + number: 1 + state: present + become: true + - name: Create media filesystem + community.general.filesystem: + dev: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:2-part1 + fstype: ext4 + become: true + - name: Mount media partition + ansible.posix.mount: + src: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:2-part1 + path: /mnt/media + fstype: ext4 + opts: rw,errors=remount-ro,x-systemd.growfs + state: mounted + become: true diff --git a/infra/cloud/0004_immich_playbook.yaml b/infra/cloud/0004_immich_playbook.yaml index f5ec067..2b38c4f 100644 --- a/infra/cloud/0004_immich_playbook.yaml +++ b/infra/cloud/0004_immich_playbook.yaml @@ -11,17 +11,17 @@ ansible.builtin.user: name: debian register: user - # - name: Docker compose down - # ansible.builtin.command: docker compose down - # args: - # chdir: "{{ user.home }}/{{ app }}" - # ignore_errors: true - # - name: Copy project - # ansible.builtin.copy: - # src: ./{{ app }} - # dest: "{{ user.home }}" - # mode: "0744" - # - name: Docker compose up -d - # ansible.builtin.command: docker compose up -d - # args: - # chdir: "{{ user.home }}/{{ app }}" + - name: Docker compose down + ansible.builtin.command: docker compose down + args: + chdir: "{{ user.home }}/{{ app }}" + ignore_errors: true + - name: Copy project + ansible.builtin.copy: + src: ./{{ app }} + dest: "{{ user.home }}" + mode: "0744" + - name: Docker compose up -d + ansible.builtin.command: docker compose up -d + args: + chdir: "{{ user.home }}/{{ app }}" diff --git a/infra/cloud/immich/docker-compose.yaml b/infra/cloud/immich/docker-compose.yaml index 3caaf6f..d967639 100644 --- a/infra/cloud/immich/docker-compose.yaml +++ b/infra/cloud/immich/docker-compose.yaml @@ -1,4 +1,4 @@ -version: "3" +version: "3.8" services: immich-server: @@ -36,7 +36,7 @@ services: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - - /mnt/data/immich-model-cache:/cache + - model-cache:/cache env_file: - .env restart: always @@ -57,7 +57,7 @@ services: # remove this to get debug messages - GLOG_minloglevel=1 volumes: - - /mnt/data/immich-typesense:/data + - tsdata:/data restart: always redis: @@ -75,7 +75,7 @@ services: POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - - /mnt/data/immich-pgdata:/var/lib/postgresql/data + - pgdata:/var/lib/postgresql/data restart: always immich-proxy: @@ -91,3 +91,8 @@ services: - immich-server - immich-web restart: always + +volumes: + pgdata: + model-cache: + tsdata: diff --git a/infra/cloud/nextcloud/all-in-one.sh b/infra/cloud/nextcloud/all-in-one.sh index 1f605aa..d4feaf8 100644 --- a/infra/cloud/nextcloud/all-in-one.sh +++ b/infra/cloud/nextcloud/all-in-one.sh @@ -11,6 +11,7 @@ docker run \ --publish 8080:8080 \ --env NEXTCLOUD_UPLOAD_LIMIT=16G \ --env NEXTCLOUD_MAX_TIME=7200 \ +--env NEXTCLOUD_ADDITIONAL_APKS="imagemagick ffmpeg" \ --env APACHE_PORT=11000 \ --env APACHE_IP_BINDING=0.0.0.0 \ --env TZ=Europe/London \