cytube/config.template.yaml
2020-08-16 13:41:36 +02:00

196 lines
6.5 KiB
YAML

mysql:
server: '${MYSQL_HOST}'
port: ${MYSQL_PORT}
database: '${MYSQL_DB}'
user: '${MYSQL_USER}'
password: '${MYSQL_PASSWORD}'
'pool-size': 10
listen:
# Listen for HTTP
- ip: '0.0.0.0'
port: 8080
http: true
# We are using a hack here, in case you need to figure out whats going on.
# As of now, there is no way to set the external port for the links that
# are generated. the `port` is ALWAYS appended, except when it matches
# the protocol of the `domain` set in the `io` section.
# (80 for http, 443 for https). This port is also the listen address
# for the socket.io webserver. Therefore our only choice is to set it to
# '443', so we can use the 'https' schema in the `io` section.
# Listen for Websocket
- ip: '0.0.0.0'
port: 443 # still unencrypted, only for hiding port
io: true
# HTTP Server details
http:
# Even though you may specify multiple ports to listen on for HTTP above,
# one port must be specified as default for the purposes of generating
# links with the appropriate port
default-port: 443
domain: 'https://${BASE_URL}'
# Specifies the root domain for cookies. If you have multiple domains
# e.g. a.example.com and b.example.com, the root domain is example.com
root-domain: '${BASE_URL}'
alt-domains:
- '127.0.0.1'
minify: false
# Max-Age for caching. Value should be an integer in milliseconds or a string accepted by
# the `ms` module. Set to 0 to disable caching.
max-age: '7d'
# Set to false to disable gzip compression
gzip: true
# Customize the threshold byte size for applying gzip
gzip-threshold: 1024
# Secret used for signed cookies. Can be anything, but make it unique and hard to guess
cookie-secret: '${COOKIE_SECRET}'
index:
max-entries: 50
# Trust reverse proxies (for x-transport-security or x-forwarded-for headers)
trust-proxies:
- "127.0.0.0/8"
- "172.16.0.0/12" # docker network
# Page template values
# title goes in the upper left corner, description goes in a <meta> tag
html-template:
title: 'ZomTube'
description: 'hungry, undead lynchtube'
# HTTPS server details
https:
enabled: false
# Even though you may specify multiple ports to listen on for HTTPS above,
# one port must be specified as default for the purposes of generating
# links with the appropriate port
default-port: 444 # cause 443 is taken by websockets
domain: 'https://${BASE_URL}'
keyfile: ''
passphrase: ''
certfile: ''
cafile: ''
ciphers: 'HIGH:!DSS:!aNULL@STRENGTH'
# Allow certain account pages to redirect to HTTPS if HTTPS is enabled.
# You may want to set this to false if you are reverse proxying HTTPS to a
# non-HTTPS address.
redirect: true
# try to not actually encrypt anything
keyfile: ''
passphrase: ''
certfile: ''
cafile: ''
# Socket.io Server details
io:
domain: 'https://${BASE_URL}'
# Even though you may specify multiple ports to listen on for HTTP above,
# one port must be specified as default for the purposes of generating
# links with the appropriate port
default-port: 443 # this doesnt even work, we have to use "80" above to hide this
# limit the number of concurrent socket connections per IP address
ip-connection-limit: 1024 # because of the reverse proxy
# YouTube v3 API key
# See https://developers.google.com/youtube/registering_an_application
# Google is closing the v2 API (which allowed anonymous requests) on
# April 20, 2015 so you must register a v3 API key now.
# NOTE: You must generate a Server key under Public API access, NOT a
# browser key.
youtube-v3-key: '${YOUTUBE_API_KEY}'
# Path before the channel name
channel-path: 'r'
# Minutes between saving channel state to disk
channel-save-interval: 5
# Limit for the number of channels a user can register
max-channels-per-user: 5
# Limit for the number of accounts an IP address can register
max-accounts-per-ip: 5
# Minimum number of seconds between guest logins from the same IP
guest-login-delay: 60
channel-storage:
type: 'database'
# Configure periodic clearing of old alias data
aliases:
# Interval (in milliseconds) between subsequent runs of clearing
purge-interval: 3600000
# Maximum age of an alias (in milliseconds) - default 1 month
max-age: 2592000000
# Workaround for Vimeo blocking my domain
vimeo-workaround: false
# Regular expressions for defining reserved user and channel names and page titles
# The list of regular expressions will be joined with an OR, and compared without
# case sensitivity.
#
# Default: reserve any name containing "admin[istrator]" or "owner" as a word
# but only if it is separated by a dash or underscore (e.g. dadmin is not reserved
# but d-admin is)
reserved-names:
usernames:
- '^(.*?[-_])?admin(istrator)?([-_].*)?$'
- '^(.*?[-_])?owner([-_].*)?$'
channels:
- '^(.*?[-_])?admin(istrator)?([-_].*)?$'
- '^(.*?[-_])?owner([-_].*)?$'
pagetitles: []
# Provide a contact list for the /contact page
contacts:
- name: 'madmaurice'
title: 'Host maintainer'
email: 'madmaurice@zom.bi'
playlist:
max-items: 4000
# How often (in seconds), mediaUpdate packets are broadcast to clients
update-interval: 5
# If set to true, when the ipThrottle and lastguestlogin rate limiters are cleared
# periodically, the garbage collector will be invoked immediately.
# The server must be invoked with node --expose-gc index.js for this to have any effect.
aggressive-gc: false
# Allows you to blacklist certain channels. Users will be automatically kicked
# upon trying to join one.
channel-blacklist: []
# If you have ffmpeg installed, you can query metadata from raw files, allowing
# server-synched raw file playback. This requires the following:
# * ffmpeg must be installed on the server
ffmpeg:
enabled: true
# Executable name for ffprobe if it is not "ffprobe". On Debian and Ubuntu (on which
# libav is used rather than ffmpeg proper), this is "avprobe"
ffprobe-exec: 'ffprobe'
link-domain-blacklist: []
# Drop root if started as root!!
setuid:
enabled: false
group: 'users'
user: 'user'
# how long to wait in ms before changing uid/gid
timeout: 15
# Allows for external services to access the system commandline
# Useful for setups where stdin isn't available such as when using PM2
# WTF is that??? do not activate!!
service-socket:
enabled: false
socket: 'service.sock'
# Twitch Client ID for the data API (used for VOD lookups)
# https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup
twitch-client-id: null
# Mixer Client ID (https://mixer.com/lab)
mixer-client-id: null
poll:
max-options: 50