Peertube

docker-compose.yml

version: "3.3"

services:

  peertube:
    image: chocobozzz/peertube:v4.1.1-bullseye
    #image: chocobozzz/peertube:production-bullseye
    container_name: "peertube"
    networks:
      - traefik
      - backend
    env_file:
      - .env

    #ports:
    # - "1935:1935" # If you don't want to use the live feature, you can comment this line
    # - "9005:9000" # If you provide your own webserver and reverse-proxy, otherwise not suitable for production
    volumes:
      - assets:/app/client/dist
      - /media/DonairPool/Peertube/Peertube-NNA:/data
      - ./docker-volume/config:/config
    depends_on:
      - postgres
      - redis
      #- postfix
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.peertubenna.rule=Host(`video.nonewabnormal.com`)"
      - "traefik.http.routers.peertubenna.entrypoints=https"
      - "traefik.http.routers.peertubenna.tls.certresolver=cloudflare"
      - "traefik.http.services.peertubenna.loadbalancer.server.port=9000"
      - "traefik.docker.network=traefik"
    restart: "always"

  postgres:
    image: postgres:13-alpine
    container_name: "peertube-db"
    env_file:
      - .env
    volumes:
      - ./docker-volume/db:/var/lib/postgresql/data
    networks:
      - backend
    restart: "always"

  redis:
    image: redis:6-alpine
    container_name: "peertube-redis"
    volumes:
      - ./docker-volume/redis:/data
    networks:
      - backend
    restart: "always"

#  postfix:
#    image: mwader/postfix-relay
#    env_file:
#      - .env
#    volumes:
#      - ./docker-volume/opendkim/keys:/etc/opendkim/keys
#    restart: "always"

networks:
  traefik:
    external: true
  backend:

volumes:
  assets:
#  docker-volume:

.env

# Database / Postgres service configuration
POSTGRES_USER=peertube
POSTGRES_PASSWORD=peertube
# Postgres database name "peertube"
POSTGRES_DB=peertube
# Editable only with a suffix :
#POSTGRES_DB=peertube_prod
#PEERTUBE_DB_SUFFIX=_prod
PEERTUBE_DB_USERNAME=peertube
PEERTUBE_DB_PASSWORD=peertube
# Default to Postgres service name "postgres" in docker-compose.yml
PEERTUBE_DB_HOSTNAME=postgres

# Server configuration
PEERTUBE_WEBSERVER_HOSTNAME=video.nonewabnormal.com
# If you do not use https and a reverse-proxy in docker-compose.yml
#PEERTUBE_WEBSERVER_PORT=443
#PEERTUBE_WEBSERVER_HTTPS=true
# If you need more than one IP as trust_proxy
# pass them as a comma separated array:
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "173.20.0.0/16"]

# E-mail configuration
# If you use a Custom SMTP server
PEERTUBE_SMTP_USERNAME=1af74a591f8d778b810a1f573e974beb
PEERTUBE_SMTP_PASSWORD=2acbbb9aff4a0ecc279c8699e20216d4
# Default to Postfix service name "postfix" in docker-compose.yml
# May be the hostname of your Custom SMTP server
PEERTUBE_SMTP_HOSTNAME=in-v3.mailjet.com
PEERTUBE_SMTP_PORT=587
PEERTUBE_SMTP_FROM=admin@nonewabnormal.com
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=admin@nonewabnormal.com

# Postfix service configuration
#POSTFIX_myhostname=<MY DOMAIN>
# If you need to generate a list of sub/DOMAIN keys
# pass them as a whitespace separated string <DOMAIN>=<selector>
OPENDKIM_DOMAINS=video.nonewabnormal.com=peertube
# see https://github.com/wader/postfix-relay/pull/18
OPENDKIM_RequireSafeKeys=no

# /!\ Prefer to use the PeerTube admin interface to set the following configurations /!\
#PEERTUBE_SIGNUP_ENABLED=true
#PEERTUBE_TRANSCODING_ENABLED=true
#PEERTUBE_CONTACT_FORM_ENABLED=true