PeerTube Deployed to Production
This commit is contained in:
117
peertube/stack.yml
Normal file
117
peertube/stack.yml
Normal file
@@ -0,0 +1,117 @@
|
||||
services:
|
||||
peertube:
|
||||
image: chocobozzz/peertube:production-bookworm
|
||||
networks:
|
||||
- frostlabs
|
||||
environment:
|
||||
# Database configuration - connecting to existing Postgres
|
||||
- POSTGRES_USER=admin
|
||||
- POSTGRES_PASSWORD=AllOfTheStars+1
|
||||
- POSTGRES_DB=peertube
|
||||
- POSTGRES_HOSTNAME=postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- PEERTUBE_DB_HOSTNAME=postgres
|
||||
- PEERTUBE_DB_PORT=5432
|
||||
- PEERTUBE_DB_USERNAME=admin
|
||||
- PEERTUBE_DB_PASSWORD=AllOfTheStars+1
|
||||
- PEERTUBE_DB_NAME=peertube
|
||||
# Redis configuration
|
||||
- REDIS_HOSTNAME=redis
|
||||
- PEERTUBE_REDIS_HOSTNAME=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", "10.0.1.0/24"]
|
||||
# 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_SMTP_DISABLE_STARTTLS=false
|
||||
- PEERTUBE_ADMIN_EMAIL=frostlabs25@gmail.com
|
||||
# Secrets - loaded from Docker secrets as files
|
||||
- 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/assets:/app/client/dist
|
||||
- /home/doc/projects/swarm-data/peertube/data:/data
|
||||
# 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
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.task == compute
|
||||
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
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- frostlabs
|
||||
volumes:
|
||||
- /home/doc/projects/swarm-data/peertube/redis:/data
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "ping" ]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.task == control
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
networks:
|
||||
- frostlabs
|
||||
environment:
|
||||
- POSTGRES_USER=admin
|
||||
- POSTGRES_PASSWORD=AllOfTheStars+1
|
||||
- POSTGRES_DB=peertube
|
||||
volumes:
|
||||
- /home/doc/projects/swarm-data/peertube/postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.task == control
|
||||
|
||||
networks:
|
||||
frostlabs:
|
||||
external: true
|
||||
|
||||
# secrets:
|
||||
# postgres-master:
|
||||
# external: true
|
||||
# peertube-key:
|
||||
# external: true
|
||||
# gmail-app-password:
|
||||
# external: true
|
||||
Reference in New Issue
Block a user