unraid to swarm migration
This commit is contained in:
90
stacks/apps/peertube/stack.yml
Normal file
90
stacks/apps/peertube/stack.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
services:
|
||||
peertube:
|
||||
image: chocobozzz/peertube:production-bookworm
|
||||
networks:
|
||||
- homelab
|
||||
environment:
|
||||
# Database configuration - connecting to existing Postgres
|
||||
- POSTGRES_USER=admin
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres-master
|
||||
- POSTGRES_DB=peertube
|
||||
- POSTGRES_HOSTNAME=postgresSQL
|
||||
# Redis configuration
|
||||
- REDIS_HOSTNAME=peertube-redis
|
||||
# PeerTube configuration
|
||||
- PEERTUBE_WEBSERVER_HOSTNAME=videos.frostlabs.me
|
||||
- PEERTUBE_WEBSERVER_PORT=443
|
||||
- PEERTUBE_WEBSERVER_HTTPS=true
|
||||
- PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16"]
|
||||
# SMTP configuration - Gmail
|
||||
- PEERTUBE_SMTP_HOSTNAME=smtp.gmail.com
|
||||
- PEERTUBE_SMTP_PORT=587
|
||||
- PEERTUBE_SMTP_USERNAME=frostlabs25@gmail.com
|
||||
- PEERTUBE_SMTP_PASSWORD_FILE=/run/secrets/gmail-app-password
|
||||
- PEERTUBE_SMTP_FROM=frostlabs25@gmail.com
|
||||
- PEERTUBE_SMTP_TLS=true
|
||||
- PEERTUBE_ADMIN_EMAIL=frostlabs25@gmail.com
|
||||
# Secrets - loaded from Docker secrets as files
|
||||
- PEERTUBE_DB_SUFFIX=_prod
|
||||
- PEERTUBE_SECRET_FILE=/run/secrets/peertube-key
|
||||
secrets:
|
||||
- postgres-master
|
||||
- peertube-key
|
||||
- gmail-app-password
|
||||
ports:
|
||||
- target: 9000
|
||||
published: 9000
|
||||
mode: host
|
||||
- target: 1935
|
||||
published: 1935
|
||||
mode: host
|
||||
volumes:
|
||||
- /home/doc/projects/unraid-appdata/PeerTube:/data
|
||||
- /home/doc/projects/unraid-appdata/PeerTube:/config
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9000/api/v1/config"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.peertube.rule=Host(`videos.frostlabs.me`)
|
||||
- traefik.http.routers.peertube.entrypoints=websecure
|
||||
- traefik.http.routers.peertube.tls=true
|
||||
- traefik.http.routers.peertube.tls.certresolver=cloudflare
|
||||
- traefik.http.services.peertube.loadbalancer.server.port=9000
|
||||
|
||||
peertube-redis:
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- homelab
|
||||
volumes:
|
||||
- peertube-redis-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
|
||||
|
||||
networks:
|
||||
homelab:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
peertube-redis-data:
|
||||
|
||||
secrets:
|
||||
postgres-master:
|
||||
external: true
|
||||
peertube-key:
|
||||
external: true
|
||||
gmail-app-password:
|
||||
external: true
|
||||
Reference in New Issue
Block a user