First commit
This commit is contained in:
commit
7675c61fcd
15 changed files with 8649 additions and 0 deletions
6
conf/app.src
Normal file
6
conf/app.src
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
SOURCE_URL=https://github.com/Chocobozzz/PeerTube/archive/develop.zip
|
||||
SOURCE_SUM=f7266fc1cb2a127902707ccc0978b4ae5f7a08c1e089feb479a78e3410872ec0
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=
|
||||
SOURCE_FILENAME=
|
||||
46
conf/nginx.conf
Normal file
46
conf/nginx.conf
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
location / {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
proxy_pass http://localhost:9000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# For the video upload
|
||||
client_max_body_size 2G;
|
||||
}
|
||||
|
||||
# Bypass PeerTube webseed route for better performances
|
||||
location /static/webseed {
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||
add_header 'Access-Control-Max-Age' 1728000;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
add_header 'Content-Length' 0;
|
||||
return 204;
|
||||
}
|
||||
|
||||
if ($request_method = 'GET') {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||
}
|
||||
|
||||
alias __FINALPATH__/videos;
|
||||
}
|
||||
|
||||
# Websocket tracker
|
||||
location /tracker/socket {
|
||||
# Peers send a message to the tracker every 15 minutes
|
||||
# Don't close the websocket before this time
|
||||
proxy_read_timeout 1200s;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:9000;
|
||||
}
|
||||
54
conf/production.yaml
Normal file
54
conf/production.yaml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
listen:
|
||||
port: 9000
|
||||
|
||||
# Correspond to your reverse proxy "listen" configuration
|
||||
webserver:
|
||||
https: true
|
||||
hostname: '__domain__'
|
||||
port: 443
|
||||
|
||||
# Your database name will be "peertube"+database.suffix
|
||||
database:
|
||||
hostname: 'localhost'
|
||||
port: 5432
|
||||
suffix: '_prod'
|
||||
username: '__db_name__'
|
||||
password: '__db_pwd__'
|
||||
|
||||
# From the project root directory
|
||||
storage:
|
||||
certs: 'certs/'
|
||||
videos: 'videos/'
|
||||
logs: 'logs/'
|
||||
previews: 'previews/'
|
||||
thumbnails: 'thumbnails/'
|
||||
torrents: 'torrents/'
|
||||
cache: 'cache/'
|
||||
|
||||
cache:
|
||||
previews:
|
||||
size: 100 # Max number of previews you want to cache
|
||||
|
||||
admin:
|
||||
email: '__email__'
|
||||
|
||||
signup:
|
||||
enabled: false
|
||||
limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
|
||||
|
||||
user:
|
||||
# Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
|
||||
# -1 == unlimited
|
||||
video_quota: -1
|
||||
|
||||
# If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
|
||||
# Uses a lot of CPU!
|
||||
transcoding:
|
||||
enabled: false
|
||||
threads: 2
|
||||
resolutions: # Only created if the original video has a higher resolution
|
||||
240p: true
|
||||
360p: true
|
||||
480p: true
|
||||
720p: true
|
||||
1080p: true
|
||||
17
conf/systemd.service
Normal file
17
conf/systemd.service
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[Unit]
|
||||
Description=PeerTube daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=NODE_ENV=production
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
ExecStart=/usr/bin/npm start
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
StandardOutput=/var/log/__APP__/__APP__.log/var/log/__APP__/__APP__.log
|
||||
StandardError=/var/log/__APP__/__APP__.log/var/log/__APP__/error__APP__.log
|
||||
SyslogIdentifier=peertube
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
7927
conf/yarn.lock
Normal file
7927
conf/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue