Skip to content

Commit

Permalink
add second peertube instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Frando committed Oct 23, 2023
1 parent 617098a commit d815fa2
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev/peertube/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ PEERTUBE_DB_HOSTNAME=postgres

# PeerTube server configuration
# If you test PeerTube in local: use "peertube.localhost" and add this domain to your host file resolving on 127.0.0.1
PEERTUBE_WEBSERVER_HOSTNAME=localhost
PEERTUBE_WEBSERVER_HOSTNAME=host.docker.internal
# If you just want to test PeerTube on local
PEERTUBE_WEBSERVER_PORT=9000
PEERTUBE_WEBSERVER_HTTPS=false
# 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", "172.18.0.0/16"]

PEERTUBE_LOG_LEVEL="debug"

# Generate one using `openssl rand -hex 32`
PEERTUBE_SECRET=66abdc69a969d9632be098c9bd8814972ca87c93a1bffae00580f228dfc57cd8
PT_INITIAL_ROOT_PASSWORD=peertube
Expand Down
1 change: 1 addition & 0 deletions dev/peertube2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-volume
50 changes: 50 additions & 0 deletions dev/peertube2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: "3.3"

services:

peertube:
# If you don't want to use the official image and build one from sources:
# build:
# context: .
# dockerfile: ./support/docker/production/Dockerfile.bullseye
image: chocobozzz/peertube:production-bullseye
env_file:
- .env

ports:
# - "1935:1935" # Comment if you don't want to use the live feature
- "9001:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
volumes:
# - ./docker-volume/assets:/app/client/dist
- ./docker-volume/data:/data
- ./docker-volume/config:/config
depends_on:
- postgres
- redis
# - postfix
restart: "always"
extra_hosts:
- "host.docker.internal:host-gateway"

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

redis:
image: redis:6-alpine
volumes:
- ./docker-volume/redis:/data
restart: "always"

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

54 changes: 54 additions & 0 deletions dev/peertube2/sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Database / Postgres service configuration
POSTGRES_USER=peertube
POSTGRES_PASSWORD=peertube
# Postgres database name "peertube"
POSTGRES_DB=peertube
# The database name used by PeerTube will be PEERTUBE_DB_NAME (only if set) *OR* 'peertube'+PEERTUBE_DB_SUFFIX
#PEERTUBE_DB_NAME=<MY POSTGRES DB NAME>
#PEERTUBE_DB_SUFFIX=_prod
# Database username and password used by PeerTube must match Postgres', so they are copied:
PEERTUBE_DB_USERNAME=peertube
PEERTUBE_DB_PASSWORD=peertube
PEERTUBE_DB_SSL=false
# Default to Postgres service name "postgres" in docker-compose.yml
PEERTUBE_DB_HOSTNAME=postgres

# PeerTube server configuration
# If you test PeerTube in local: use "peertube.localhost" and add this domain to your host file resolving on 127.0.0.1
PEERTUBE_WEBSERVER_HOSTNAME=host.docker.internal
# If you just want to test PeerTube on local
PEERTUBE_WEBSERVER_PORT=9001
PEERTUBE_WEBSERVER_HTTPS=false
# 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", "172.18.0.0/16"]
PEERTUBE_LOG_LEVEL="debug"

# Generate one using `openssl rand -hex 32`
PEERTUBE_SECRET=66abdc69a969d9632be098c9bd8814972ca87c93a1bffae00580f228dfc57cd8
PT_INITIAL_ROOT_PASSWORD=peertube
# E-mail configuration
# If you use a Custom SMTP server
#PEERTUBE_SMTP_USERNAME=
#PEERTUBE_SMTP_PASSWORD=
# Default to Postfix service name "postfix" in docker-compose.yml
# May be the hostname of your Custom SMTP server
PEERTUBE_SMTP_HOSTNAME=postfix
PEERTUBE_SMTP_PORT=25
PEERTUBE_SMTP_FROM=noreply@<MY DOMAIN>
PEERTUBE_SMTP_TLS=false
PEERTUBE_SMTP_DISABLE_STARTTLS=false
PEERTUBE_ADMIN_EMAIL=[email protected]

# Postfix service configuration
#POSTFIX_myhostname=localhost
# If you need to generate a list of sub/DOMAIN keys
# pass them as a whitespace separated string <DOMAIN>=<selector>
#OPENDKIM_DOMAINS=<MY DOMAIN>=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

0 comments on commit d815fa2

Please sign in to comment.