Add peertube/docker-compose.yml
This commit is contained in:
102
peertube/docker-compose.yml
Normal file
102
peertube/docker-compose.yml
Normal file
@@ -0,0 +1,102 @@
|
||||
# TODO change volumes to match local path(s)
|
||||
# TODO change environment variables, make sure all instances match
|
||||
# TODO To generate PeerTube secret, run: openssl rand -hex 32
|
||||
|
||||
volumes:
|
||||
config:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /Volumes/Treat/Containers/peertube/config
|
||||
data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /Volumes/Treat/Containers/peertube/data
|
||||
opendkim:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /Volumes/Treat/Containers/peertube/opendkim
|
||||
postgres:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /Volumes/Treat/Containers/peertube/postgres
|
||||
redis:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /Volumes/Treat/Containers/peertube/redis
|
||||
|
||||
services:
|
||||
peertube:
|
||||
# If you don't want to use the official image and build one from sources:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./support/docker/production/Dockerfile
|
||||
image: chocobozzz/peertube:production-bookworm
|
||||
# Use a static IP for this container because nginx does not handle proxy host change without reload
|
||||
# This container could be restarted on crash or until the postgresql database is ready for connection
|
||||
# networks:
|
||||
# default:
|
||||
# ipv4_address: 172.18.0.42
|
||||
# ipv6_address: fdab:e4b3:21a2:ef1b::42
|
||||
environment:
|
||||
POSTGRES_DB: peertube
|
||||
PEERTUBE_DB_USERNAME: postgres
|
||||
PEERTUBE_DB_PASSWORD: PASSWORD
|
||||
PEERTUBE_DB_SSL: false
|
||||
PEERTUBE_DB_HOSTNAME: postgres
|
||||
PEERTUBE_WEBSERVER_HOSTNAME: DOMAIN
|
||||
PEERTUBE_TRUST_PROXY: ["127.0.0.1", "loopback", "172.18.0.0/16"]
|
||||
PEERTUBE_SECRET: GENERATE_ME
|
||||
PEERTUBE_SMTP_HOSTNAME: postfix
|
||||
PEERTUBE_SMTP_PORT: 25
|
||||
PEERTUBE_SMTP_FROM: noreply@DOMAIN
|
||||
PEERTUBE_SMTP_TLS: false
|
||||
PEERTUBE_SMTP_DISABLE_STARTTLS: false
|
||||
PEERTUBE_ADMIN_EMAIL: EMAIL_ADDRESS
|
||||
ports:
|
||||
- "1935:1935" # Comment if you don't want to use the live feature
|
||||
- "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
|
||||
volumes:
|
||||
- data:/data
|
||||
- config:/config
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- postfix
|
||||
restart: "always"
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: PASSWORD
|
||||
POSTGRES_DB: peertube
|
||||
volumes:
|
||||
- postgres:/var/lib/postgresql/data
|
||||
restart: "always"
|
||||
|
||||
redis:
|
||||
image: redis:8-alpine
|
||||
volumes:
|
||||
- redis:/data
|
||||
restart: "always"
|
||||
|
||||
postfix:
|
||||
image: mwader/postfix-relay
|
||||
environment:
|
||||
POSTFIX_myhostname: DOMAIN
|
||||
OPENDKIM_DOMAINS: DOMAIN=peertube
|
||||
# see https://github.com/wader/postfix-relay/pull/18
|
||||
OPENDKIM_RequireSafeKeys: no
|
||||
volumes:
|
||||
- opendkim:/etc/opendkim/keys
|
||||
restart: "always"
|
||||
Reference in New Issue
Block a user