diff --git a/dns.yml b/dns.yml index c71bf8b..acca9f5 100644 --- a/dns.yml +++ b/dns.yml @@ -47,10 +47,6 @@ ip: "{{ network.netcup_ip }}" - name: pdg ip: "{{ network.netcup_ip }}" - - name: opds - ip: "{{ network.netcup_ip }}" - - name: sync - ip: "{{ network.netcup_ip }}" - name: gokapi ip: "{{ network.netcup_ip }}" - name: id diff --git a/group_vars/all/domains.yml b/group_vars/all/domains.yml index 8b9fbf4..1626d80 100644 --- a/group_vars/all/domains.yml +++ b/group_vars/all/domains.yml @@ -25,8 +25,6 @@ subdomains: gotify: "gotify.{{ primary_domain }}" # Gotify notifications gotify_assistant: "gotify-assistant.{{ primary_domain }}" # iGotify iOS assistant listmonk: "listmonk.{{ secondary_domain }}" # Listmonk mailing list - dir2opds: "opds.{{ primary_domain }}" # dir2opds OPDS catalog - kosync: "sync.{{ primary_domain }}" # KOReader sync server gokapi: "gokapi.{{ primary_domain }}" # Gokapi file sharing pocketid: "id.{{ primary_domain }}" # Pocket ID passkey OIDC diff --git a/group_vars/docker/services.yml b/group_vars/docker/services.yml index dc9072f..2203985 100644 --- a/group_vars/docker/services.yml +++ b/group_vars/docker/services.yml @@ -4,7 +4,7 @@ service_categories: infrastructure: ["caddy", "authentik", "dockge"] development: ["gitea", "bytestash"] - media: ["audiobookshelf", "kavita", "dir2opds", "hoarder", "kosync", "manyfold"] + media: ["audiobookshelf", "kavita", "hoarder", "manyfold"] productivity: ["paperlessngx", "baikal", "syncthing", "heyform", "dawarich", "obsidian-livesync", "gokapi"] communication: ["gotosocial", "listmonk"] monitoring: ["changedetection", "appriseapi", "gotify", "cronmaster"] diff --git a/roles/docker/tasks/infrastructure/caddy.yml b/roles/docker/tasks/infrastructure/caddy.yml index c4dff8d..da98b93 100644 --- a/roles/docker/tasks/infrastructure/caddy.yml +++ b/roles/docker/tasks/infrastructure/caddy.yml @@ -5,41 +5,6 @@ loop: - /opt/stacks/caddy -- name: Install apache2-utils for htpasswd - ansible.builtin.apt: - name: apache2-utils - state: present - update_cache: true - cache_valid_time: 3600 - become: true - when: vault_dir2opds is defined - -# bcrypt uses a random salt, so a fresh hash would change the Caddyfile (and -# restart Caddy) on every run. Reuse the deployed hash while it still matches -# the vault password; only make a new one when it doesn't. -- name: Get bcrypt hash for dir2opds basic auth - ansible.builtin.shell: | - set -eu - cur=$(awk -v u="$AUTH_USER" '/basic_?auth/ {b=1} b && $1 == u {print $2; exit}' \ - /opt/stacks/caddy/Caddyfile 2>/dev/null || true) - if [ -n "$cur" ]; then - tmp=$(mktemp); trap 'rm -f "$tmp"' EXIT - printf '%s:%s\n' "$AUTH_USER" "$cur" > "$tmp" - if htpasswd -vb "$tmp" "$AUTH_USER" "$AUTH_PASS" >/dev/null 2>&1; then - echo "$AUTH_USER $cur" - exit 0 - fi - fi - htpasswd -bnB "$AUTH_USER" "$AUTH_PASS" | awk -F: 'NF {print $1, $2}' - environment: - AUTH_USER: "{{ vault_dir2opds.basic_auth_user }}" - AUTH_PASS: "{{ vault_dir2opds.basic_auth_password }}" - register: dir2opds_basic_auth_hash_result - changed_when: false - check_mode: false - no_log: true - when: vault_dir2opds is defined - - name: template Caddyfile ansible.builtin.template: src: Caddyfile.j2 diff --git a/roles/docker/tasks/media/dir2opds.yml b/roles/docker/tasks/media/dir2opds.yml deleted file mode 100644 index e06f6c2..0000000 --- a/roles/docker/tasks/media/dir2opds.yml +++ /dev/null @@ -1,26 +0,0 @@ -- name: make dir2opds directories - ansible.builtin.file: - path: "{{ item}}" - state: directory - loop: - - /opt/stacks/dir2opds - -- name: make dir2opds book directories - ansible.builtin.file: - path: "{{ item}}" - state: directory - loop: - - /opt/stacks/dir2opds/books - -- name: Template out the compose file - ansible.builtin.template: - src: dir2opds-compose.yml.j2 - dest: /opt/stacks/dir2opds/compose.yml - owner: root - mode: '0644' - -- name: deploy dir2opds stack - community.docker.docker_compose_v2: - project_src: /opt/stacks/dir2opds - files: - - compose.yml diff --git a/roles/docker/tasks/media/kosync.yml b/roles/docker/tasks/media/kosync.yml deleted file mode 100644 index 54179bb..0000000 --- a/roles/docker/tasks/media/kosync.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: make kosync directories - ansible.builtin.file: - path: "{{ item }}" - state: directory - loop: - - /opt/stacks/kosync - - /opt/stacks/kosync/logs/app - - /opt/stacks/kosync/logs/redis - - /opt/stacks/kosync/data/redis - -- name: Template out the compose file - ansible.builtin.template: - src: kosync-compose.yml.j2 - dest: /opt/stacks/kosync/compose.yml - owner: root - mode: '0644' - -- name: deploy kosync stack - community.docker.docker_compose_v2: - project_src: /opt/stacks/kosync - files: - - compose.yml diff --git a/roles/docker/tasks/media/main.yml b/roles/docker/tasks/media/main.yml index e5a16db..25878b9 100644 --- a/roles/docker/tasks/media/main.yml +++ b/roles/docker/tasks/media/main.yml @@ -22,10 +22,3 @@ import_tasks: manyfold.yml tags: manyfold -- name: Install dir2opds - import_tasks: dir2opds.yml - tags: dir2opds - -- name: Install koreader sync server - import_tasks: kosync.yml - tags: kosync diff --git a/roles/docker/templates/Caddyfile.j2 b/roles/docker/templates/Caddyfile.j2 index ebb2f33..1471fd0 100644 --- a/roles/docker/templates/Caddyfile.j2 +++ b/roles/docker/templates/Caddyfile.j2 @@ -126,19 +126,7 @@ repaircafe.nerder.land { redir /volunteer-signup https://listmonk.nerder.land/subscription/form 301 } -{% if vault_dir2opds is defined %} -opds.thesatelliteoflove.com { - basicauth { - {{ dir2opds_basic_auth_hash_result.stdout }} - } - reverse_proxy dir2opds:8080 -} -{% endif %} - gokapi.thesatelliteoflove.com { reverse_proxy gokapi:53842 } -sync.thesatelliteoflove.com { - reverse_proxy kosync:17200 -} diff --git a/roles/docker/templates/dir2opds-compose.yml.j2 b/roles/docker/templates/dir2opds-compose.yml.j2 deleted file mode 100644 index dd9e4eb..0000000 --- a/roles/docker/templates/dir2opds-compose.yml.j2 +++ /dev/null @@ -1,23 +0,0 @@ ---- -services: - dir2opds: - image: ghcr.io/dubyte/dir2opds:v1.9.0 - container_name: dir2opds - ports: - - "{{ network.docker_host_ip }}:8080:8080" - volumes: - - ./books:/books - command: - - -dir=/books - - -extract-metadata - - -enable-cache - - -gzip - - -enable-html - - -url=https://{{ subdomains.dir2opds }} - restart: unless-stopped - labels: - mag37.dockcheck.update: true -networks: - default: - external: true - name: {{ docker.network_name }} diff --git a/roles/docker/templates/kosync-compose.yml.j2 b/roles/docker/templates/kosync-compose.yml.j2 deleted file mode 100644 index 4d3de2d..0000000 --- a/roles/docker/templates/kosync-compose.yml.j2 +++ /dev/null @@ -1,18 +0,0 @@ ---- -services: - kosync: - image: koreader/kosync:latest - container_name: kosync - environment: - - ENABLE_USER_REGISTRATION=false - volumes: - - ./logs/app:/app/koreader-sync-server/logs - - ./logs/redis:/var/log/redis - - ./data/redis:/var/lib/redis - restart: unless-stopped - labels: - mag37.dockcheck.update: true -networks: - default: - external: true - name: {{ docker.network_name }}