From 5d6c6b4adb8c1a1c31244352ec630cf99d416c58 Mon Sep 17 00:00:00 2001 From: Nico Jensch Date: Sat, 7 Dec 2024 16:24:15 +0100 Subject: [PATCH] feat(docker): move the named volumes to be created via compose, as bind mount to backuped up directory The other changes are due to running yamlfix. --- docker-compose/all-in-one/docker-compose.yml | 90 ++++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/docker-compose/all-in-one/docker-compose.yml b/docker-compose/all-in-one/docker-compose.yml index 47e8f33..281b85d 100644 --- a/docker-compose/all-in-one/docker-compose.yml +++ b/docker-compose/all-in-one/docker-compose.yml @@ -1,29 +1,38 @@ --- services: # Nextcloud AIO (self-managed containers) + # The dummy mounts are for creating the required volumes, even + # though the container doesn't use them. The actual containers + # making use of these volumes are started by the master container. + # Do *not* change container and volume names! nextcloud-aio-mastercontainer: image: nextcloud/all-in-one:latest restart: always - container_name: nextcloud-aio-mastercontainer # Don't change this! + container_name: nextcloud-aio-mastercontainer volumes: - - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # Don't change this! - /var/run/docker.sock:/var/run/docker.sock:ro - ports: - - 8080:8080 + - nextcloud_aio_clamav:/dummy/clamav + - nextcloud_aio_database:/dummy/database + - nextcloud_aio_mastercontainer:/mnt/docker-aio-config + - nextcloud_aio_nextcloud:/dummy/nextcloud + - nextcloud_aio_nextcloud_data:/dummy/nextcloud_data + - nextcloud_aio_redis:/dummy/redis + ports: [8080:8080] environment: - - APACHE_PORT=11000 - - APACHE_IP_BINDING=10.0.5.100 + APACHE_PORT: 11000 + APACHE_IP_BINDING: 10.0.5.100 + NEXTCLOUD_DATADIR: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/nextcloud_data # Firefox syncserver syncserver: container_name: syncserver - image: crazymax/firefox-syncserver:edge # newest, versioned one 3 years old - volumes: ["./syncserver:/data"] - ports: ["5001:5000"] + image: crazymax/firefox-syncserver:edge # newest, versioned one 3 years old + volumes: [./syncserver:/data] + ports: [5001:5000] environment: FF_SYNCSERVER_ACCESSLOG: true FF_SYNCSERVER_FORCE_WSGI_ENVIRON: true - FF_SYNCSERVER_FORWARDED_ALLOW_IPS: "*" + FF_SYNCSERVER_FORWARDED_ALLOW_IPS: '*' FF_SYNCSERVER_PUBLIC_URL: https://ffsync.garudalinux.org FF_SYNCSERVER_SECRET: ${FF_SYNCSERVER_SECRET:-?err} FF_SYNCSERVER_SQLURI: sqlite:////data/syncserver.db @@ -34,16 +43,16 @@ services: thelounge: image: thelounge/thelounge:4.4.3 container_name: thelounge - volumes: ["./thelounge:/var/opt/thelounge"] - ports: ["9000:9000"] + volumes: [./thelounge:/var/opt/thelounge] + ports: [9000:9000] restart: always # Password vault vaultwarden: image: vaultwarden/server:1.32.5-alpine container_name: vaultwarden - volumes: ["./bitwarden:/data"] - ports: ["8081:80"] + volumes: [./bitwarden:/data] + ports: [8081:80] environment: ADMIN_TOKEN: ${BW_ADMIN_TOKEN:-?err} DOMAIN: https://bitwarden.garudalinux.org @@ -66,15 +75,15 @@ services: volumes: - ./privatebin:/srv/data - ./configs/privatebin.cfg.php:/srv/cfg/conf.php - ports: ["8082:8080"] + ports: [8082:8080] restart: always # WikiJs wikijs: image: requarks/wiki:2.5 container_name: wikijs - volumes: ["./wikijs/assets:/wiki/assets/favicons"] - ports: ["3001:3000"] + volumes: [./wikijs/assets:/wiki/assets/favicons] + ports: [3001:3000] environment: DB_TYPE: postgres DB_HOST: 10.0.5.50 @@ -109,8 +118,7 @@ services: MINUTES_BETWEEN_RUNS: 240 NSFW: false POST_COUNT: 50 - REMOTE_INSTANCES: - '[ "beehaw.org", "lemmy.world", "lemmy.ml", "sh.itjust.works", + REMOTE_INSTANCES: '[ "beehaw.org", "lemmy.world", "lemmy.ml", "sh.itjust.works", "lemmy.one" ]' SECONDS_AFTER_COMMUNITY_ADD: 17 restart: unless-stopped @@ -119,12 +127,44 @@ services: watchtower: image: containrrr/watchtower:1.7.1 container_name: watchtower - command: - --cleanup matterbridge wikijs privatebin vaultwarden - thelounge syncserver lemmy_seeder - volumes: ["/var/run/docker.sock:/var/run/docker.sock"] + command: --cleanup matterbridge wikijs privatebin vaultwarden thelounge syncserver + lemmy_seeder + volumes: [/var/run/docker.sock:/var/run/docker.sock] restart: always - volumes: nextcloud_aio_mastercontainer: - name: nextcloud_aio_mastercontainer # Don't change this! + name: nextcloud_aio_mastercontainer + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/mastercontainer + o: bind + nextcloud_aio_clamav: + name: nextcloud_aio_clamav + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/clamav + o: bind + nextcloud_aio_database: + name: nextcloud_aio_database + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/database + o: bind + nextcloud_aio_nextcloud: + name: nextcloud_aio_nextcloud + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/nextcloud + o: bind + nextcloud_aio_nextcloud_data: + name: nextcloud_aio_nextcloud_data + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/nextcloud_data + o: bind + nextcloud_aio_redis: + name: nextcloud_aio_redis + driver_opts: + type: none + device: /var/garuda/docker-compose-runner/all-in-one/nextcloud-aio/redis + o: bind