Init commit
This commit is contained in:
87
support/docker/production/.env
Normal file
87
support/docker/production/.env
Normal file
@@ -0,0 +1,87 @@
|
||||
# Database / Postgres service configuration
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
# 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=peertube
|
||||
#PEERTUBE_DB_SUFFIX=_prod
|
||||
# Database username and password used by PeerTube must match Postgres', so they are copied:
|
||||
PEERTUBE_DB_USERNAME=$POSTGRES_USER
|
||||
PEERTUBE_DB_PASSWORD=$POSTGRES_PASSWORD
|
||||
PEERTUBE_DB_SSL=false
|
||||
# Default to Postgres service name "postgres" in docker-compose.yml
|
||||
PEERTUBE_DB_HOSTNAME=postgres
|
||||
PEERTUBE_REDIS_HOSTNAME=redis
|
||||
|
||||
# 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
|
||||
# Use a local hostname for testing
|
||||
PEERTUBE_WEBSERVER_HOSTNAME=localhost
|
||||
# local dev settings
|
||||
PEERTUBE_WEBSERVER_HTTPS=false
|
||||
PEERTUBE_WEBSERVER_PORT=9000
|
||||
# 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"]
|
||||
|
||||
# Generate one using `openssl rand -hex 32`
|
||||
PEERTUBE_SECRET=615d0c43a256c3e4fb81dd473e251ab67393bdb1719e9a2abb0f4ec4da26bc56
|
||||
|
||||
# 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@peertube.localhost
|
||||
PEERTUBE_SMTP_TLS=false
|
||||
PEERTUBE_SMTP_DISABLE_STARTTLS=false
|
||||
PEERTUBE_ADMIN_EMAIL=admin@peertube.localhost
|
||||
|
||||
# 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=peertube.localhost=peertube
|
||||
# see https://github.com/wader/postfix-relay/pull/18
|
||||
OPENDKIM_RequireSafeKeys=no
|
||||
|
||||
# If you want to enable object storage for PeerTube, set the following variables.
|
||||
#PEERTUBE_OBJECT_STORAGE_ENABLED=
|
||||
#PEERTUBE_OBJECT_STORAGE_ENDPOINT=
|
||||
#PEERTUBE_OBJECT_STORAGE_REGION=
|
||||
#PEERTUBE_OBJECT_STORAGE_FORCE_PATH_STYLE=
|
||||
#PEERTUBE_OBJECT_STORAGE_CREDENTIALS_ACCESS_KEY_ID=
|
||||
#PEERTUBE_OBJECT_STORAGE_CREDENTIALS_SECRET_ACCESS_KEY=
|
||||
#PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BUCKET_NAME=
|
||||
#PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_PREFIX=
|
||||
#PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL=
|
||||
#PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME=
|
||||
#PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX=
|
||||
#PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL=
|
||||
#PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BUCKET_NAME=
|
||||
#PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_PREFIX=
|
||||
#PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BASE_URL=
|
||||
#PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BUCKET_NAME=
|
||||
#PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_PREFIX=
|
||||
#PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BASE_URL=
|
||||
#PEERTUBE_OBJECT_STORAGE_CAPTIONS_BUCKET_NAME=
|
||||
#PEERTUBE_OBJECT_STORAGE_CAPTIONS_PREFIX=
|
||||
#PEERTUBE_OBJECT_STORAGE_CAPTIONS_BASE_URL=
|
||||
|
||||
# Comment these variables if your S3 provider does not support object ACL
|
||||
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PUBLIC="public-read"
|
||||
PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PRIVATE="private"
|
||||
|
||||
#PEERTUBE_LOG_LEVEL=info
|
||||
|
||||
# /!\ 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
|
||||
3
support/docker/production/.gitignore
vendored
Normal file
3
support/docker/production/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
data/
|
||||
db/
|
||||
redis/
|
||||
65
support/docker/production/Dockerfile
Normal file
65
support/docker/production/Dockerfile
Normal file
@@ -0,0 +1,65 @@
|
||||
FROM node:20-trixie-slim
|
||||
|
||||
ARG ALREADY_BUILT=0
|
||||
|
||||
# Install dependencies
|
||||
RUN apt update \
|
||||
&& apt install -y --no-install-recommends openssl ffmpeg python3 python3-pip ca-certificates gnupg gosu build-essential curl git va-driver-all \
|
||||
&& gosu nobody true \
|
||||
&& rm /var/lib/apt/lists/* -fR
|
||||
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Node images hardcode the node uid to 1000 so that number is not available.
|
||||
# The "peertube" user is created as a system account which selects a UID from
|
||||
# the range of SYS_UID_MIN to SYS_UID_MAX (-1 to 1000] and consistently
|
||||
# selects 999 given the current image build steps. The same is true for the
|
||||
# system group range SYS_GID_MIN and SYS_GID_MAX. It is fine to manually assign
|
||||
# them an ID outside of that range.
|
||||
ENV DEFAULT_PEERTUBE_UID=999
|
||||
ENV DEFAULT_PEERTUBE_GID=999
|
||||
|
||||
# Add peertube user
|
||||
RUN groupadd -r -g ${PEERTUBE_GID:-${DEFAULT_PEERTUBE_GID}} peertube \
|
||||
&& useradd -r -u ${PEERTUBE_UID:-${DEFAULT_PEERTUBE_UID}} -g peertube -m peertube
|
||||
|
||||
# Install PeerTube
|
||||
COPY --chown=peertube:peertube . /app
|
||||
WORKDIR /app
|
||||
|
||||
# Do not ship local development overrides in production image.
|
||||
RUN rm -f /app/config/local.yaml
|
||||
|
||||
USER peertube
|
||||
|
||||
# Install manually client dependencies to apply our network timeout option
|
||||
RUN if [ "${ALREADY_BUILT}" = 0 ]; then \
|
||||
npm run install-node-dependencies \
|
||||
&& npm run build; \
|
||||
else \
|
||||
echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \
|
||||
fi; \
|
||||
rm -rf ./node_modules ./client/node_modules ./client/.angular \
|
||||
&& npm run install-node-dependencies -- --production \
|
||||
&& pnpm store prune
|
||||
|
||||
USER root
|
||||
|
||||
RUN mkdir /data /config
|
||||
RUN chown -R peertube:peertube /data /config
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV NODE_CONFIG_DIR /app/config:/app/support/docker/production/config:/config
|
||||
ENV PEERTUBE_LOCAL_CONFIG /config
|
||||
|
||||
VOLUME /data
|
||||
VOLUME /config
|
||||
|
||||
COPY ./support/docker/production/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
|
||||
# Expose API, RTMP and RTMPS ports
|
||||
EXPOSE 9000 1935 1936
|
||||
|
||||
# Run the application
|
||||
CMD [ "node", "dist/server" ]
|
||||
6
support/docker/production/Dockerfile.nginx
Normal file
6
support/docker/production/Dockerfile.nginx
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY ./support/docker/production/entrypoint.nginx.sh /docker-entrypoint.d/99-entrypoint.nginx.sh
|
||||
RUN chmod +x /docker-entrypoint.d/99-entrypoint.nginx.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
@@ -0,0 +1,327 @@
|
||||
#
|
||||
# This file will be read by node-config
|
||||
# See https://github.com/node-config/node-config/wiki/Environment-Variables#custom-environment-variables
|
||||
#
|
||||
|
||||
webserver:
|
||||
hostname: "PEERTUBE_WEBSERVER_HOSTNAME"
|
||||
port:
|
||||
__name: "PEERTUBE_WEBSERVER_PORT"
|
||||
__format: "json"
|
||||
https:
|
||||
__name: "PEERTUBE_WEBSERVER_HTTPS"
|
||||
__format: "json"
|
||||
|
||||
federation:
|
||||
sign_federated_fetches:
|
||||
__name: "PEERTUBE_SIGN_FEDERATED_FETCHES"
|
||||
__format: "json"
|
||||
|
||||
secrets:
|
||||
peertube: "PEERTUBE_SECRET"
|
||||
|
||||
trust_proxy:
|
||||
__name: "PEERTUBE_TRUST_PROXY"
|
||||
__format: "json"
|
||||
|
||||
database:
|
||||
hostname: "PEERTUBE_DB_HOSTNAME"
|
||||
port:
|
||||
__name: "PEERTUBE_DB_PORT"
|
||||
__format: "json"
|
||||
name: "PEERTUBE_DB_NAME"
|
||||
suffix: "PEERTUBE_DB_SUFFIX"
|
||||
username: "PEERTUBE_DB_USERNAME"
|
||||
password: "PEERTUBE_DB_PASSWORD"
|
||||
ssl:
|
||||
__name: "PEERTUBE_DB_SSL"
|
||||
__format: "json"
|
||||
|
||||
redis:
|
||||
hostname: "PEERTUBE_REDIS_HOSTNAME"
|
||||
port:
|
||||
__name: "PEERTUBE_REDIS_PORT"
|
||||
__format: "json"
|
||||
auth: "PEERTUBE_REDIS_AUTH"
|
||||
|
||||
smtp:
|
||||
hostname: "PEERTUBE_SMTP_HOSTNAME"
|
||||
port:
|
||||
__name: "PEERTUBE_SMTP_PORT"
|
||||
__format: "json"
|
||||
username: "PEERTUBE_SMTP_USERNAME"
|
||||
password: "PEERTUBE_SMTP_PASSWORD"
|
||||
tls:
|
||||
__name: "PEERTUBE_SMTP_TLS"
|
||||
__format: "json"
|
||||
disable_starttls:
|
||||
__name: "PEERTUBE_SMTP_DISABLE_STARTTLS"
|
||||
__format: "json"
|
||||
from_address: "PEERTUBE_SMTP_FROM"
|
||||
|
||||
object_storage:
|
||||
enabled:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
endpoint: "PEERTUBE_OBJECT_STORAGE_ENDPOINT"
|
||||
|
||||
region: "PEERTUBE_OBJECT_STORAGE_REGION"
|
||||
|
||||
force_path_style:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_FORCE_PATH_STYLE"
|
||||
__format: "json"
|
||||
|
||||
upload_acl:
|
||||
public: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PUBLIC"
|
||||
private: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL_PRIVATE"
|
||||
|
||||
proxy:
|
||||
proxify_private_files:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_PROXY_PROXIFY_PRIVATE_FILES"
|
||||
__format: "json"
|
||||
|
||||
credentials:
|
||||
access_key_id: "PEERTUBE_OBJECT_STORAGE_CREDENTIALS_ACCESS_KEY_ID"
|
||||
secret_access_key: 'PEERTUBE_OBJECT_STORAGE_CREDENTIALS_SECRET_ACCESS_KEY'
|
||||
|
||||
max_upload_part:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_MAX_UPLOAD_PART"
|
||||
__format: "json"
|
||||
|
||||
max_request_attempts:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_MAX_REQUEST_ATTEMPTS"
|
||||
__format: "json"
|
||||
|
||||
streaming_playlists:
|
||||
bucket_name: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BUCKET_NAME"
|
||||
prefix: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_PREFIX"
|
||||
base_url: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL"
|
||||
store_live_streams:
|
||||
__name: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_STORE_LIVE_STREAMS"
|
||||
__format: "json"
|
||||
|
||||
web_videos:
|
||||
bucket_name: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME"
|
||||
prefix: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX"
|
||||
base_url: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL"
|
||||
|
||||
user_exports:
|
||||
bucket_name: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BUCKET_NAME"
|
||||
prefix: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_PREFIX"
|
||||
base_url: "PEERTUBE_OBJECT_STORAGE_USER_EXPORTS_BASE_URL"
|
||||
|
||||
original_video_files:
|
||||
bucket_name: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BUCKET_NAME"
|
||||
prefix: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_PREFIX"
|
||||
base_url: "PEERTUBE_OBJECT_STORAGE_ORIGINAL_VIDEO_FILES_BASE_URL"
|
||||
|
||||
captions:
|
||||
bucket_name: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_BUCKET_NAME"
|
||||
prefix: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_PREFIX"
|
||||
base_url: "PEERTUBE_OBJECT_STORAGE_CAPTIONS_BASE_URL"
|
||||
|
||||
webadmin:
|
||||
configuration:
|
||||
edition:
|
||||
allowed:
|
||||
__name: "PEERTUBE_WEBADMIN_CONFIGURATION_EDITION_ALLOWED"
|
||||
__format: "json"
|
||||
|
||||
log:
|
||||
level: "PEERTUBE_LOG_LEVEL"
|
||||
log_ping_requests:
|
||||
__name: "PEERTUBE_LOG_PING_REQUESTS"
|
||||
__format: "json"
|
||||
|
||||
user:
|
||||
video_quota:
|
||||
__name: "PEERTUBE_USER_VIDEO_QUOTA"
|
||||
__format: "json"
|
||||
|
||||
admin:
|
||||
email: "PEERTUBE_ADMIN_EMAIL"
|
||||
|
||||
contact_form:
|
||||
enabled:
|
||||
__name: "PEERTUBE_CONTACT_FORM_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
signup:
|
||||
enabled:
|
||||
__name: "PEERTUBE_SIGNUP_ENABLED"
|
||||
__format: "json"
|
||||
limit:
|
||||
__name: "PEERTUBE_SIGNUP_LIMIT"
|
||||
__format: "json"
|
||||
|
||||
search:
|
||||
remote_uri:
|
||||
users:
|
||||
__name: "PEERTUBE_SEARCH_REMOTEURI_USERS"
|
||||
__format: "json"
|
||||
anonymous:
|
||||
__name: "PEERTUBE_SEARCH_REMOTEURI_ANONYMOUS"
|
||||
__format: "json"
|
||||
|
||||
import:
|
||||
videos:
|
||||
http:
|
||||
enabled:
|
||||
__name: "PEERTUBE_IMPORT_VIDEOS_HTTP"
|
||||
__format: "json"
|
||||
torrent:
|
||||
enabled:
|
||||
__name: "PEERTUBE_IMPORT_VIDEOS_TORRENT"
|
||||
__format: "json"
|
||||
|
||||
transcoding:
|
||||
enabled:
|
||||
__name: "PEERTUBE_TRANSCODING_ENABLED"
|
||||
__format: "json"
|
||||
threads:
|
||||
__name: "PEERTUBE_TRANSCODING_THREADS"
|
||||
__format: "json"
|
||||
resolutions:
|
||||
144p:
|
||||
__name: "PEERTUBE_TRANSCODING_144P"
|
||||
__format: "json"
|
||||
240p:
|
||||
__name: "PEERTUBE_TRANSCODING_240P"
|
||||
__format: "json"
|
||||
360p:
|
||||
__name: "PEERTUBE_TRANSCODING_360P"
|
||||
__format: "json"
|
||||
480p:
|
||||
__name: "PEERTUBE_TRANSCODING_480P"
|
||||
__format: "json"
|
||||
720p:
|
||||
__name: "PEERTUBE_TRANSCODING_720P"
|
||||
__format: "json"
|
||||
1080p:
|
||||
__name: "PEERTUBE_TRANSCODING_1080P"
|
||||
__format: "json"
|
||||
1440p:
|
||||
__name: "PEERTUBE_TRANSCODING_1440P"
|
||||
__format: "json"
|
||||
2160p:
|
||||
__name: "PEERTUBE_TRANSCODING_2160P"
|
||||
__format: "json"
|
||||
web_videos:
|
||||
enabled:
|
||||
__name: "PEERTUBE_TRANSCODING_WEB_VIDEOS_ENABLED"
|
||||
__format: "json"
|
||||
hls:
|
||||
enabled:
|
||||
__name: "PEERTUBE_TRANSCODING_HLS_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
instance:
|
||||
name: "PEERTUBE_INSTANCE_NAME"
|
||||
description: "PEERTUBE_INSTANCE_DESCRIPTION"
|
||||
terms: "PEERTUBE_INSTANCE_TERMS"
|
||||
|
||||
live:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
max_duration:
|
||||
__name: "PEERTUBE_LIVE_MAX_DURATION"
|
||||
__format: "json"
|
||||
|
||||
max_instance_lives:
|
||||
__name: "PEERTUBE_LIVE_MAX_INSTANCE_LIVES"
|
||||
__format: "json"
|
||||
|
||||
max_user_lives:
|
||||
__name: "PEERTUBE_LIVE_MAX_USER_LIVES"
|
||||
__format: "json"
|
||||
|
||||
allow_replay:
|
||||
__name: "PEERTUBE_LIVE_ALLOW_REPLAY"
|
||||
__format: "json"
|
||||
|
||||
latency_setting:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_LATENCY_SETTING_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
rtsp:
|
||||
endpoint: "PEERTUBE_LIVE_RTSP_ENDPOINT"
|
||||
url_pattern: "PEERTUBE_LIVE_RTSP_URL_PATTERN"
|
||||
|
||||
rtmp:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_RTMP_ENABLED"
|
||||
__format: "json"
|
||||
port:
|
||||
__name: "PEERTUBE_LIVE_RTMP_PORT"
|
||||
__format: "json"
|
||||
hostname: "PEERTUBE_LIVE_RTMP_HOSTNAME"
|
||||
public_hostname: "PEERTUBE_LIVE_RTMP_PUBLIC_HOSTNAME"
|
||||
rtmps:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_RTMPS_ENABLED"
|
||||
__format: "json"
|
||||
port:
|
||||
__name: "PEERTUBE_LIVE_RTMPS_PORT"
|
||||
__format: "json"
|
||||
hostname: "PEERTUBE_LIVE_RTMPS_HOSTNAME"
|
||||
public_hostname: "PEERTUBE_LIVE_RTMPS_PUBLIC_HOSTNAME"
|
||||
key_file: "PEERTUBE_LIVE_RTMPS_KEY_FILE"
|
||||
cert_file: "PEERTUBE_LIVE_RTMPS_CERT_FILE"
|
||||
|
||||
transcoding:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
remote_runners:
|
||||
enabled:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_REMOTE_RUNNERS_ENABLED"
|
||||
__format: "json"
|
||||
|
||||
threads:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_THREADS"
|
||||
__format: "json"
|
||||
|
||||
profile: "PEERTUBE_LIVE_TRANSCODING_PROFILE"
|
||||
|
||||
resolutions:
|
||||
0p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_0P"
|
||||
__format: "json"
|
||||
144p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_144P"
|
||||
__format: "json"
|
||||
240p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_240P"
|
||||
__format: "json"
|
||||
360p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_360P"
|
||||
__format: "json"
|
||||
480p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_480P"
|
||||
__format: "json"
|
||||
720p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_720P"
|
||||
__format: "json"
|
||||
1080p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_1080P"
|
||||
__format: "json"
|
||||
1440p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_1440P"
|
||||
__format: "json"
|
||||
2160p:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_2160P"
|
||||
__format: "json"
|
||||
|
||||
always_transcode_original_resolution:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION"
|
||||
__format: "json"
|
||||
|
||||
fps:
|
||||
max:
|
||||
__name: "PEERTUBE_LIVE_TRANSCODING_FPS_MAX"
|
||||
__format: "json"
|
||||
74
support/docker/production/config/production.yaml
Normal file
74
support/docker/production/config/production.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
# Check config/production.yaml.example in PeerTube repository for more details/available configuration
|
||||
|
||||
listen:
|
||||
hostname: '0.0.0.0'
|
||||
port: 9000
|
||||
|
||||
webserver:
|
||||
https: true
|
||||
hostname: undefined
|
||||
port: 443
|
||||
|
||||
rates_limit:
|
||||
login:
|
||||
window: 5 minutes
|
||||
max: 15
|
||||
ask_send_email:
|
||||
window: 5 minutes
|
||||
max: 3
|
||||
|
||||
trust_proxy:
|
||||
- 'loopback'
|
||||
- 'linklocal'
|
||||
- 'uniquelocal'
|
||||
|
||||
database:
|
||||
hostname: 'postgres'
|
||||
port: 5432
|
||||
ssl: false
|
||||
suffix: ''
|
||||
username: 'postgres'
|
||||
password: 'postgres'
|
||||
|
||||
redis:
|
||||
hostname: 'redis'
|
||||
port: 6379
|
||||
auth: null
|
||||
|
||||
# From the project root directory
|
||||
storage:
|
||||
tmp: '../data/tmp/'
|
||||
tmp_persistent: '../data/tmp-persistent/'
|
||||
bin: '../data/bin/'
|
||||
avatars: '../data/avatars/'
|
||||
web_videos: '../data/web-videos/'
|
||||
streaming_playlists: '../data/streaming-playlists'
|
||||
original_video_files: '../data/original-video-files'
|
||||
redundancy: '../data/redundancy/'
|
||||
logs: '../data/logs/'
|
||||
previews: '../data/previews/'
|
||||
thumbnails: '../data/thumbnails/'
|
||||
storyboards: '../data/storyboards/'
|
||||
torrents: '../data/torrents/'
|
||||
captions: '../data/captions/'
|
||||
cache: '../data/cache/'
|
||||
plugins: '../data/plugins/'
|
||||
uploads: '../data/uploads/'
|
||||
well_known: '../data/well-known/'
|
||||
client_overrides: '../data/client-overrides/'
|
||||
|
||||
|
||||
object_storage:
|
||||
upload_acl:
|
||||
public: null # Set to null here because we can't using env variables
|
||||
private: null
|
||||
|
||||
log:
|
||||
level: 'info'
|
||||
|
||||
tracker:
|
||||
enabled: true
|
||||
reject_too_many_announces: false # false because we have issues with docker ws ip/port forwarding
|
||||
|
||||
admin:
|
||||
email: null
|
||||
119
support/docker/production/docker-compose.yml
Normal file
119
support/docker/production/docker-compose.yml
Normal file
@@ -0,0 +1,119 @@
|
||||
services:
|
||||
|
||||
# You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
|
||||
# webserver:
|
||||
# image: chocobozzz/peertube-webserver:latest
|
||||
# # If you don't want to use the official image and build one from sources:
|
||||
# # build:
|
||||
# # context: .
|
||||
# # dockerfile: ./support/docker/production/Dockerfile.nginx
|
||||
# env_file:
|
||||
# - .env
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# volumes:
|
||||
# - type: bind
|
||||
# # Switch sources if you downloaded the whole repository
|
||||
# #source: ../../nginx/peertube
|
||||
# source: ./docker-volume/nginx/peertube
|
||||
# target: /etc/nginx/conf.d/peertube.template
|
||||
# - assets:/var/www/peertube/peertube-latest/client/dist:ro
|
||||
# - ./docker-volume/data:/var/www/peertube/storage
|
||||
# - certbot-www:/var/www/certbot
|
||||
# - ./docker-volume/certbot/conf:/etc/letsencrypt
|
||||
# - ./docker-volume/nginx-logs:/var/log/nginx
|
||||
# depends_on:
|
||||
# - peertube
|
||||
# restart: "always"
|
||||
|
||||
# # You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
|
||||
# certbot:
|
||||
# container_name: certbot
|
||||
# image: certbot/certbot
|
||||
# volumes:
|
||||
# - ./docker-volume/certbot/conf:/etc/letsencrypt
|
||||
# - certbot-www:/var/www/certbot
|
||||
# restart: unless-stopped
|
||||
# entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
|
||||
# depends_on:
|
||||
# - webserver
|
||||
|
||||
# You can comment this webserver-reloader section if you want to use another webserver/proxy or test PeerTube in local
|
||||
# webserver-reloader:
|
||||
# image: alpine:latest
|
||||
# command: >
|
||||
# sh -c "trap exit TERM;
|
||||
# while :; do
|
||||
# sleep 21600 & wait $$!;
|
||||
# echo 'Sending reload signal to webserver...';
|
||||
# kill -HUP 1;
|
||||
# done"
|
||||
# pid: "service:webserver"
|
||||
# depends_on:
|
||||
# - webserver
|
||||
# restart: "always"
|
||||
|
||||
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
|
||||
# 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.28.0.42
|
||||
ipv6_address: fdab:e4b3:21a2:ef1c::42
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
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:
|
||||
# Remove the following line if you want to use another webserver/proxy or test PeerTube in local
|
||||
- assets:/app/client/dist
|
||||
- ./docker-volume/data:/data
|
||||
- ./docker-volume/config:/config
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
# - postfix
|
||||
restart: "always"
|
||||
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./docker-volume/db:/var/lib/postgresql/data
|
||||
restart: "always"
|
||||
|
||||
redis:
|
||||
image: redis:8-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"
|
||||
|
||||
networks:
|
||||
default:
|
||||
enable_ipv6: false
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
- subnet: fdab:e4b3:21a2:ef1c::/64
|
||||
|
||||
volumes:
|
||||
assets:
|
||||
certbot-www:
|
||||
@@ -0,0 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXhXF+Ma/5MfbX
|
||||
irFNboIsA44yiH827F75EOFHFV0fN6k+J2guj/JGHLj+QGg4GpJTLkQAFNeZOylY
|
||||
VgGn3yAyQMsdEX1C8fIMWU/tWqeHHf+68l4AV2k0h8qeMgeRZOWbN9OhLDEeHt9W
|
||||
/BLLqE+toqpGB2vbXL/j6Vt9fRILnx0jlczRb2GjNUquSMWtvoQbqMDsMmPponoN
|
||||
HgmmitXYZDikStKf5mK4xrcQrSDxrXdUWujScR+Nttp/W6BiE4b8ONehqCEW1WxR
|
||||
xpF6cV7R+Yd3K1hgaJFY984RSoE9HS1PZ+3S7uZBzM+nOzgwvqtIagywv+8wtnze
|
||||
EpehFgqNAgMBAAECggEABl7RGtZfblrKlHtGJKc1Rl6iP6eQEewasERFLYpsHjpj
|
||||
h2iAf0Ro07m1niCUquYnT14dlHDAIPY4/zSUvs4auPPTn2l6pKftkMkFUqRxDPMX
|
||||
Mbm1+QXA/AteV4xuc7ErOEEGLzn5dSAtoK7eLRJSP3Vb/oXpojyPBlNJxHGDrL+j
|
||||
qMb3Iw/OzIj4ADNkZXy3V0Nu6KFEL5OQVb4rH+Sy7RQ1O2CBeF//bD5AK+HYs4EH
|
||||
VKh+KvTuBP1JL4t4pJIRa8fMnLsOaCaj5Qlf9mU0glE6qu7Ngqpwsatiwkgt28tO
|
||||
Q6kHJ4hXvfnTp+ZXgwOzk5D7VSKTTficm1Q72kpQAQKBgQDs15+yh4pJKWxAxkSA
|
||||
ieDWTJ3pnEdCKOJtppcRKbAIeZ0GpKzpayu94wfqIHZhN+WHWZyIopasFNH9ztxb
|
||||
Z1HjhdwUnBwRfbO/rPhjQcyIhtmxqRI+dEff1yZfvGhA0qaDgK6ITpBOG30HIh+1
|
||||
Orb/9BBlu08a43Nuyz+kD+fJDQKBgQDo9FFWbwmM87L+H0yceMAK7Ecxi7RGV6op
|
||||
EzQ9xAOpVzCc1VMdC3RKG63BLZGEka4Jz0UGeIsuWQrcgQ/IX0munvrXQ/eiblOV
|
||||
p26FPw87swgRhFnV6iu6U/gdO7noSr5vCqBoArL3XwsmYo8hEFaLGvWpxnGtagtv
|
||||
uU0+rJvngQKBgQDL5t9ALlypnBXstkUnfIyrMo8JHlhi5xv5VuDcD83Tng/INmH/
|
||||
GxsvgZPAx23jSOI84rNXFtMtF0eqgTtJHexsO0Q8IiIwFM55iIrXuUBDkgU9ZNem
|
||||
GSn/1hTdezEuDaz5rgGUrD6kYBoF2CUAO6ptNUwgqV/zQDqS+jyyHFdqyQKBgCQE
|
||||
qpLXpj1h7Ln38ut6jA7kS3mwpRX/NfMV4gzuwrYrIfwNy8UA4WEX+HyW5BoAQE2J
|
||||
+50thC+NWu2PEvajLQxPzm78NkyqDEhmU+NMRbmwS74RnaZCh7JOi11Rv8PX0qvu
|
||||
k7ChQjSXQG0V7hVppkfpyjQO18K9U7lZiET5gT2BAoGBANeJsl3W1dKn58cIyf8O
|
||||
eD3QGJtQFBc/A23n0PcQk1+5PhzameKwHwtbBqa93Qf2aTfKT10gekQ+nCFPOkfe
|
||||
xKJCfsrne/Dv6IGacXOgxKhMIUa6tZ35quPyz3qqKRK3cK939S3NaQTwyMbrPK6e
|
||||
CfjVoTEj/dlqXCuC4EZXKY+d
|
||||
-----END PRIVATE KEY-----
|
||||
@@ -0,0 +1,3 @@
|
||||
peertube._domainkey.peertube.localhost. IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA14VxfjGv+TH214qxTW6CLAOOMoh/Nuxe+RDhRxVdHzepPidoLo/yRhy4/kBoOBqSUy5EABTXmTspWFYBp98gMkDLHRF9QvHyDFlP7Vqnhx3/uvJeAFdpNIfKnjIHkWTlmzfToSwxHh7fVvwSy6hPraKqRgdr21y/4+lbfX0SC58dI5XM0W9hozVKrkjFrb6EG6jA7DJj6aJ6DR"
|
||||
"4JporV2GQ4pErSn+ZiuMa3EK0g8a13VFro0nEfjbbaf1ugYhOG/DjXoaghFtVsUcaRenFe0fmHdytYYGiRWPfOEUqBPR0tT2ft0u7mQczPpzs4ML6rSGoMsL/vMLZ83hKXoRYKjQIDAQAB" ) ; ----- DKIM key peertube for peertube.localhost
|
||||
10
support/docker/production/entrypoint.nginx.sh
Normal file
10
support/docker/production/entrypoint.nginx.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Process the nginx template
|
||||
SOURCE_FILE="/etc/nginx/conf.d/peertube.template"
|
||||
TARGET_FILE="/etc/nginx/conf.d/default.conf"
|
||||
export WEBSERVER_HOST="$PEERTUBE_WEBSERVER_HOSTNAME"
|
||||
export PEERTUBE_HOST="peertube:9000"
|
||||
|
||||
envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE
|
||||
19
support/docker/production/entrypoint.sh
Normal file
19
support/docker/production/entrypoint.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
|
||||
find /config ! -user peertube -exec chown peertube:peertube {} \; || true
|
||||
|
||||
# first arg is `-f` or `--some-option`
|
||||
# or first arg is `something.conf`
|
||||
if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
|
||||
set -- node "$@"
|
||||
fi
|
||||
|
||||
# allow the container to be started with `--user`
|
||||
if [ "$1" = 'node' -a "$(id -u)" = '0' ]; then
|
||||
find /data ! -user peertube -exec chown peertube:peertube {} \;
|
||||
exec gosu peertube "$0" "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user