88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
services:
|
|
peertube:
|
|
image: chocobozzz/peertube:production-bookworm
|
|
networks:
|
|
- homelab
|
|
environment:
|
|
# Database configuration - connecting to existing Postgres
|
|
- POSTGRES_USER=admin
|
|
- POSTGRES_PASSWORD=AllOfTheStars+1
|
|
- POSTGRES_DB=peertube
|
|
- POSTGRES_HOST=10.0.4.10
|
|
- POSTGRES_PORT=5432
|
|
# 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=tewo awqe ffhw rtun
|
|
- 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=dfd1cad851c1a5b795131fd2033d46ef80c809b5ac30a3ce8e69b049587138a2
|
|
# 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/swarm-data/appdata/peertube/data:/data
|
|
- /home/doc/projects/swarm-data/appdata/peertube/config:/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:
|
|
- /home/doc/projects/swarm-data/appdata/peertube/redis:/data
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 1
|
|
|
|
networks:
|
|
homelab:
|
|
external: true
|
|
|
|
# secrets:
|
|
# postgres-master:
|
|
# external: true
|
|
# peertube-key:
|
|
# external: true
|
|
# gmail-app-password:
|
|
# external: true
|