From 43bcb0ce1a6688d0db5c6bcf94121961419d05df Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 15 Feb 2025 15:41:45 -0300 Subject: [PATCH 1/2] fix: add custom dns to hollo service the service resolve the internal IP of the VM so the federation didn't work --- files/docker/fedi/Phanpy.Dockerfile | 29 ++++++++++++++++++++++++++++ files/docker/fedi/docker-stack.yaml | 30 ++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 files/docker/fedi/Phanpy.Dockerfile diff --git a/files/docker/fedi/Phanpy.Dockerfile b/files/docker/fedi/Phanpy.Dockerfile new file mode 100644 index 0000000..abdfa00 --- /dev/null +++ b/files/docker/fedi/Phanpy.Dockerfile @@ -0,0 +1,29 @@ +FROM node:20-alpine AS builder + +ARG PHANPY_CLIENT_NAME="Phanpy" +ARG PHANPY_WEBSITE="https://phanpy.social" +ARG PHANPY_LINGVA_INSTANCES="lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud" +ARG PHANPY_PRIVACY_POLICY_URL="https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD" +ARG PHANPY_DEFAULT_INSTANCE="mastodon.social" + +ENV PHANPY_CLIENT_NAME=${PHANPY_CLIENT_NAME} \ + PHANPY_WEBSITE=${PHANPY_WEBSITE} \ + PHANPY_LINGVA_INSTANCES=${PHANPY_LINGVA_INSTANCES} \ + PHANPY_PRIVACY_POLICY_URL=${PHANPY_PRIVACY_POLICY_URL} \ + PHANPY_DEFAULT_INSTANCE=${PHANPY_DEFAULT_INSTANCE} + +WORKDIR /app + +RUN apk add --no-cache --virtual .build-deps git && \ + git clone --depth 1 -b production https://github.com/cheeaun/phanpy.git . && \ + npm install && \ + npm run build && \ + apk del .build-deps + +FROM nginx:alpine + +RUN echo -e 'server_tokens off;\nclient_max_body_size 99m;' > /etc/nginx/conf.d/custom.conf + +COPY --from=builder /app/dist /usr/share/nginx/html + +EXPOSE 80 diff --git a/files/docker/fedi/docker-stack.yaml b/files/docker/fedi/docker-stack.yaml index 1410726..e7c9b28 100644 --- a/files/docker/fedi/docker-stack.yaml +++ b/files/docker/fedi/docker-stack.yaml @@ -3,6 +3,11 @@ services: image: ghcr.io/fedify-dev/hollo:canary env_file: - .env + networks: + - default + - reverse_proxy + dns: + - 1.1.1.1 deploy: rollback_config: failure_action: continue @@ -15,7 +20,7 @@ services: - node.labels.services_kind==${SERVICE_KIND:-common} labels: - traefik.enable=true - - traefik.http.routers.hollo.rule=Host(`hollo.alecodes.page`) + - traefik.http.routers.hollo.rule=Host(`fedi.alecodes.page`) - traefik.http.services.hollo.loadbalancer.server.port=3000 hollo_db: @@ -35,6 +40,29 @@ services: placement: constraints: - node.labels.services_kind==${SERVICE_KIND:-common} + phanpy: + image: ghcr.io/yitsushi/phanpy-docker:2024.04.04.65d51b0 + networks: + - reverse_proxy + deploy: + labels: + - "homepage.group=Social" + - "homepage.icon=/icons/phanpy.png" + - "homepage.name=Phanpy" + - "homepage.href=https://phanpy.alecodes.page/" + - "homepage.description=Alternative Mastodon Web Client" + + - traefik.enable=true + - traefik.http.routers.hollo-ui.rule=Host(`phanpy.alecodes.page`) + - traefik.http.services.hollo-ui.loadbalancer.server.port=80 + +networks: + phanpy-network: + driver: bridge volumes: hollo_db: + +networks: + reverse_proxy: + external: true From 8cc44f750079cc762af60c03a908962426887635 Mon Sep 17 00:00:00 2001 From: aleidk Date: Sat, 15 Feb 2025 15:42:08 -0300 Subject: [PATCH 2/2] feat: add books services --- files/docker/books/docker-stack.yaml | 79 ++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/docker/books/docker-stack.yaml diff --git a/files/docker/books/docker-stack.yaml b/files/docker/books/docker-stack.yaml new file mode 100644 index 0000000..6520743 --- /dev/null +++ b/files/docker/books/docker-stack.yaml @@ -0,0 +1,79 @@ +services: + suwayomi: + image: ghcr.io/suwayomi/tachidesk:latest + restart: unless-stopped + networks: + - default + - reverse_proxy + environment: + - TZ=America/Santiago + # Comment these out if you do not use the flaresolverr container at the bottom of this file + - FLARESOLVERR_ENABLED=true + - FLARESOLVERR_URL=http://tasks.flaresolverr:8191 + volumes: + - suwayomi_downloads:/home/suwayomi/.local/share/Tachidesk/downloads + - suwayomi_data:/home/suwayomi/.local/share/Tachidesk + deploy: + rollback_config: + failure_action: continue + update_config: + delay: 2s + failure_action: rollback + order: start-first + placement: + constraints: + - node.labels.services_kind==${SERVICE_KIND:-common} + labels: + - traefik.enable=true + - traefik.http.routers.suwayomi.rule=Host(`suwayomi.alecodes.page`) + - traefik.http.services.suwayomi.loadbalancer.server.port=4567 + + flaresolverr: + image: ghcr.io/flaresolverr/flaresolverr:latest + environment: + - TZ=America/Santiago + restart: unless-stopped + + kavita: + image: lscr.io/linuxserver/kavita:latest + restart: unless-stopped + networks: + - default + - reverse_proxy + volumes: + - suwayomi_downloads:/suwayomi + - kavita_manga:/manga + - kavita_comics:/comics + - kavita_books:/books + - kavita_config:/config + environment: + - TZ=America/Santiago + - DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true + - PUID=1000 + - PGID=1000 + deploy: + rollback_config: + failure_action: continue + update_config: + delay: 2s + failure_action: rollback + order: start-first + placement: + constraints: + - node.labels.services_kind==${SERVICE_KIND:-common} + labels: + - traefik.enable=true + - traefik.http.routers.kavita.rule=Host(`kavita.alecodes.page`) + - traefik.http.services.kavita.loadbalancer.server.port=5000 + +networks: + reverse_proxy: + external: true + +volumes: + suwayomi_data: + suwayomi_downloads: + kavita_config: + kavita_manga: + kavita_comics: + kavita_books: