From 8f9bd5ec8d75fd95f8784a3a188110bc340fb3bc Mon Sep 17 00:00:00 2001 From: John Allison Date: Sat, 25 Oct 2025 12:33:03 -0400 Subject: [PATCH] New Services: --- stacks/apps/adminer/stack.yml | 18 +++++++++ stacks/apps/n8n/stack.yml | 35 +++++++++++++++++ stacks/apps/paperless/stack.yml | 64 ++++++++++++++++++++++++++++++++ stacks/core/caddy/Caddyfile | 26 +++++++++++++ stacks/core/caddy/stack.yml | 32 ++++++++++++++++ stacks/core/portainer/stack.yml | 34 +++++++++++++++++ stacks/core/postgres/stack.yml | 2 +- stacks/media/emby/stack.yml | 29 +++++++++++++++ stacks/media/notifiarr/stack.yml | 23 ++++++++++++ stacks/media/prowlarr/stack.yml | 27 ++++++++++++++ stacks/media/radarr/stack.yml | 28 ++++++++++++++ stacks/media/sabnzbd/stack.yml | 28 ++++++++++++++ stacks/media/sonarr/stack.yml | 22 +++++++++++ stacks/web/tracker/stack.yml | 19 ++++++++++ 14 files changed, 386 insertions(+), 1 deletion(-) create mode 100644 stacks/apps/adminer/stack.yml create mode 100644 stacks/apps/n8n/stack.yml create mode 100644 stacks/apps/paperless/stack.yml create mode 100644 stacks/core/caddy/Caddyfile create mode 100644 stacks/core/caddy/stack.yml create mode 100644 stacks/core/portainer/stack.yml create mode 100644 stacks/media/emby/stack.yml create mode 100644 stacks/media/notifiarr/stack.yml create mode 100644 stacks/media/prowlarr/stack.yml create mode 100644 stacks/media/radarr/stack.yml create mode 100644 stacks/media/sabnzbd/stack.yml create mode 100644 stacks/media/sonarr/stack.yml create mode 100644 stacks/web/tracker/stack.yml diff --git a/stacks/apps/adminer/stack.yml b/stacks/apps/adminer/stack.yml new file mode 100644 index 0000000..e7d2bc1 --- /dev/null +++ b/stacks/apps/adminer/stack.yml @@ -0,0 +1,18 @@ +services: + adminer: + image: adminer:latest + networks: + - homelab + ports: + - 8091:8080 + environment: + - ADMINER_DEFAULT_SERVER=postgres + - ADMINER_DESIGN=nette + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == p0 +networks: + homelab: + external: true diff --git a/stacks/apps/n8n/stack.yml b/stacks/apps/n8n/stack.yml new file mode 100644 index 0000000..1f5234c --- /dev/null +++ b/stacks/apps/n8n/stack.yml @@ -0,0 +1,35 @@ +services: + n8n: + image: n8nio/n8n:latest + ports: + - 5678:5678 + networks: + - homelab + environment: + - N8N_HOST=n8n.bitfrost.me + - N8N_PORT=5678 + - N8N_PROTOCOL=https + - N8N_RUNNERS_ENABLED=true + - WEBHOOK_URL=https://n8n.bitfrost.me/ + - TZ=America/New_York + volumes: + - /mnt/swarm-data/n8n:/home/node/.n8n + - /var/run/docker.sock:/var/run/docker.sock:ro + deploy: + replicas: 1 + placement: + constraints: + - node.role == manager + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + resources: + limits: + memory: 2G + reservations: + memory: 512M + +networks: + homelab: + external: true \ No newline at end of file diff --git a/stacks/apps/paperless/stack.yml b/stacks/apps/paperless/stack.yml new file mode 100644 index 0000000..f8a71ff --- /dev/null +++ b/stacks/apps/paperless/stack.yml @@ -0,0 +1,64 @@ +services: + paperless_redis: + image: redis:alpine + networks: + - homelab + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == p0 + + paperless_webserver: + image: ghcr.io/paperless-ngx/paperless-ngx:latest + ports: + - 8000:8000 + volumes: + - /mnt/swarm-data/paperless/data:/usr/src/paperless/data + - /mnt/swarm-data/paperless/media:/usr/src/paperless/media + - /mnt/swarm-data/paperless/export:/usr/src/paperless/export + - /mnt/gmail-exports/documents:/usr/src/paperless/consume + secrets: + - postgres-master + - paperless-secret-key + - paperless-admin-pass + environment: + - PAPERLESS_REDIS=redis://paperless_redis:6379 + - PAPERLESS_DBHOST=postgres + - PAPERLESS_DBNAME=paperless + - PAPERLESS_DBUSER=admin + - PAPERLESS_DBPASS_FILE=/run/secrets/postgres-master + - PAPERLESS_SECRET_KEY_FILE=/run/secrets/paperless-secret-key + - PAPERLESS_TIME_ZONE=America/New_York + - PAPERLESS_OCR_LANGUAGE=eng + - PAPERLESS_URLS=https://docs.frostlabs.home + - PAPERLESS_ALLOWED_HOSTS=docs.frostlabs.home + - PAPERLESS_CONSUMER_POLLING=5 + - PAPERLESS_CONSUMER_DELETE_DUPLICATES=true + - PAPERLESS_CONSUMER_RECURSIVE=true + - PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false + - PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_Store","._*",".stfolder",".stversions","Thumbs.db"] + - PAPERLESS_ENABLE_CLASSIFIER=true + - PAPERLESS_ADMIN_USER=admin + - PAPERLESS_ADMIN_PASSWORD_FILE=/run/secrets/paperless-admin-pass + - PAPERLESS_ADMIN_MAIL=john.allisonwin@outlook.com + networks: + - homelab + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == p0 + depends_on: + - postgres + - paperless_redis +networks: + homelab: + external: true +secrets: + paperless-admin-pass: + external: true + paperless-secret-key: + external: true + postgres-master: + external: true diff --git a/stacks/core/caddy/Caddyfile b/stacks/core/caddy/Caddyfile new file mode 100644 index 0000000..fb4ff3d --- /dev/null +++ b/stacks/core/caddy/Caddyfile @@ -0,0 +1,26 @@ +{ + auto_https disable_redirects +} + +# Caddy Dashboard (optional) +:2019 { + metrics /metrics +} + +# Portainer +portainer.frostlabs.home { + reverse_proxy portainer:9000 + tls internal +} + +# Paperless-NGX +docs.frostlabs.home { + reverse_proxy paperless:8000 + tls internal +} + +# Adminer +miner.frostlabs.home { + reverse_proxy adminer:8091 + tls internal +} \ No newline at end of file diff --git a/stacks/core/caddy/stack.yml b/stacks/core/caddy/stack.yml new file mode 100644 index 0000000..a6f9b24 --- /dev/null +++ b/stacks/core/caddy/stack.yml @@ -0,0 +1,32 @@ +networks: + homelab: + external: true + +services: + caddy: + image: caddy:latest + ports: + - target: 80 + published: 80 + mode: host + - target: 443 + published: 443 + mode: host + - target: 2019 + published: 2019 + mode: host + networks: + - homelab + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + - /mnt/swarm-data/caddy/data:/data + - /mnt/swarm-data/caddy/config:/config + deploy: + mode: global + placement: + constraints: + - node.role == manager + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 \ No newline at end of file diff --git a/stacks/core/portainer/stack.yml b/stacks/core/portainer/stack.yml new file mode 100644 index 0000000..efb4322 --- /dev/null +++ b/stacks/core/portainer/stack.yml @@ -0,0 +1,34 @@ +networks: + homelab: + external: true + +services: + agent: + image: portainer/agent:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker/volumes:/var/lib/docker/volumes + networks: + - homelab + deploy: + mode: global + placement: + constraints: + - node.platform.os == linux + + portainer: + image: portainer/portainer-ce:latest + command: -H tcp://tasks.agent:9001 --tlsskipverify + ports: + - "9443:9443" + - "9000:9000" + volumes: + - /mnt/swarm-data/portainer:/data + networks: + - homelab + deploy: + mode: replicated + replicas: 1 + placement: + constraints: + - node.role == manager \ No newline at end of file diff --git a/stacks/core/postgres/stack.yml b/stacks/core/postgres/stack.yml index 94c453b..b899df5 100644 --- a/stacks/core/postgres/stack.yml +++ b/stacks/core/postgres/stack.yml @@ -14,7 +14,7 @@ services: ports: - 5432:5432 deploy: - replicas: 3 + replicas: 1 placement: constraints: - node.hostname == p0 diff --git a/stacks/media/emby/stack.yml b/stacks/media/emby/stack.yml new file mode 100644 index 0000000..2b5182a --- /dev/null +++ b/stacks/media/emby/stack.yml @@ -0,0 +1,29 @@ +services: + emby: + image: lscr.io/linuxserver/emby:latest + networks: + - homelab + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - /mnt/swarm-data/emby:/config + - /mnt/data/media/tv:/data/tvshows + - /mnt/data/media/movies:/data/movies + ports: + - 8096:8096 + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8096/web/index.html" ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 120s + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == p4 +networks: + homelab: + external: true diff --git a/stacks/media/notifiarr/stack.yml b/stacks/media/notifiarr/stack.yml new file mode 100644 index 0000000..ebd321c --- /dev/null +++ b/stacks/media/notifiarr/stack.yml @@ -0,0 +1,23 @@ +services: + notifiarr: + image: golift/notifiarr:latest + hostname: notifiarr + networks: + - homelab + ports: + - "5454:5454" + volumes: + - /mnt/swarm-data/Notifiarr:/config + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - TZ=America/New_York + - PUID=1000 + - PGID=1000 + deploy: + replicas: 1 + placement: + constraints: + - node.role == worker +networks: + homelab: + external: true \ No newline at end of file diff --git a/stacks/media/prowlarr/stack.yml b/stacks/media/prowlarr/stack.yml new file mode 100644 index 0000000..1e6dee2 --- /dev/null +++ b/stacks/media/prowlarr/stack.yml @@ -0,0 +1,27 @@ +services: + prowlarr: + image: lscr.io/linuxserver/prowlarr:latest + networks: + - homelab + ports: + - 9696:9696 + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - /mnt/swarm-data/prowlarr:/config + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:9696/ping" ] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + replicas: 1 + placement: + constraints: + - node.role == worker +networks: + homelab: + external: true diff --git a/stacks/media/radarr/stack.yml b/stacks/media/radarr/stack.yml new file mode 100644 index 0000000..67df699 --- /dev/null +++ b/stacks/media/radarr/stack.yml @@ -0,0 +1,28 @@ +services: + radarr: + image: lscr.io/linuxserver/radarr:latest + networks: + - homelab + ports: + - 7878:7878 + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - /mnt/swarm-data/radarr:/config + - /mnt/data:/data + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:7878/ping" ] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + replicas: 1 + placement: + constraints: + - node.role == worker +networks: + homelab: + external: true \ No newline at end of file diff --git a/stacks/media/sabnzbd/stack.yml b/stacks/media/sabnzbd/stack.yml new file mode 100644 index 0000000..e0dc739 --- /dev/null +++ b/stacks/media/sabnzbd/stack.yml @@ -0,0 +1,28 @@ +services: + sabnzbd: + image: lscr.io/linuxserver/sabnzbd:latest + networks: + - homelab + ports: + - 8080:8080 + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - /mnt/swarm-data/sabnzbd:/config + - /mnt/data/usenet:/data/usenet + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8080/api?mode=version" ] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + replicas: 1 + placement: + constraints: + - node.hostname == p4 +networks: + homelab: + external: true diff --git a/stacks/media/sonarr/stack.yml b/stacks/media/sonarr/stack.yml new file mode 100644 index 0000000..6673315 --- /dev/null +++ b/stacks/media/sonarr/stack.yml @@ -0,0 +1,22 @@ +services: + sonarr: + image: lscr.io/linuxserver/sonarr:latest + networks: + - homelab + ports: + - 8989:8989 + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - /mnt/swarm-data/sonarr:/config + - /mnt/data:/data + deploy: + replicas: 1 + placement: + constraints: + - node.role == worker +networks: + homelab: + external: true diff --git a/stacks/web/tracker/stack.yml b/stacks/web/tracker/stack.yml new file mode 100644 index 0000000..3bec01e --- /dev/null +++ b/stacks/web/tracker/stack.yml @@ -0,0 +1,19 @@ +services: + tracker-nginx: + image: nginx:alpine + ports: + - 8180:80 + networks: + - homelab + volumes: + - /mnt/swarm-data/webservers/production/nginx/nginx.conf:/etc/nginx/nginx.conf:ro + - /mnt/swarm-data/webservers/production/nginx/.conf/default.conf:/etc/nginx/conf.d/default.conf:ro + - /mnt/swarm-data/webfiles/production/taylors-development:/usr/share/nginx/html:ro + deploy: + replicas: 3 + placement: + constraints: + - node.role == worker +networks: + homelab: + external: true \ No newline at end of file