diff --git a/README.md b/README.md
index fe2acf5..b3d7b2a 100644
--- a/README.md
+++ b/README.md
@@ -4,23 +4,19 @@
## Installation
1. Require dedicated domain like **peertube.domain.tld**.
1. No LDAP support (blocked until upstream implements it)
- 1. No Multi-instance
1. No url change possible
1. Peertube is under development stage, **don't use it for production**
1. Take notice that this YunoHost package *claims* the following features:
- [x] Install
- [x] Remove
- - [ ] Upgrade
- - [ ] Backup
- - [ ] Restore
+ - [x] Upgrade
+ - [x] Backup
+ - [x] Restore
1. **Install the app by following command:**
$ sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh
1. **root** is the admin username and the admin email is the email address given at the time of installation.
- 1. **After installation change the password by this command:**
-
- $ cd /var/www/peertube && NODE_ENV=production npm run reset-password -- -u root
PeerTube
@@ -51,12 +47,8 @@ Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (t
### Dependencies
- * **NodeJS >= 6.x**
- * **npm >= 3.x**
- * yarn
- * OpenSSL (cli)
- * PostgreSQL
- * FFmpeg
+ * NodeJS, PostgreSQL
+ * It adds jessie-backports for ffmpeg
## LICENSE
diff --git a/check_process b/check_process
index af9b88c..78e090d 100644
--- a/check_process
+++ b/check_process
@@ -16,9 +16,9 @@
setup_nourl=0
setup_private=1
setup_public=1
- upgrade=0
- backup_restore=0
- multi_instance=0
+ upgrade=1
+ backup_restore=1
+ multi_instance=1
incorrect_path=0
port_already_use=1
change_url=0
@@ -26,8 +26,8 @@
Level 1=auto
Level 2=auto
Level 3=auto
-# Level 4:
- Level 4=0
+# Level 4: not supported by upstream
+ Level 4=1
# Level 5:
Level 5=auto
Level 6=auto
@@ -36,5 +36,5 @@
Level 9=0
Level 10=0
;;; Options
-Email=
-Notification=none
+Email=anmol@datamol.org
+Notification=yes
diff --git a/conf/app.src b/conf/app.src
index fed8eaa..d751cb7 100644
--- a/conf/app.src
+++ b/conf/app.src
@@ -1,5 +1,5 @@
-SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.1/peertube-v1.0.0-beta.1.zip
-SOURCE_SUM=8e80aaa503de0d28be209375b48dd9242abec16a3bde473b684286c67e19af13
+SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.0.0-beta.3/peertube-v1.0.0-beta.3.zip
+SOURCE_SUM=6c6714d5229fcfaa5215fedc40e3dd476f39cf7cc62a27ab55e5bb082bd2509c
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 7aa8e7b..b7fe0bc 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -1,18 +1,37 @@
-location / {
+ location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
+ add_header Cache-Control "public, max-age=31536000, immutable";
+
+ alias __FINALPATH__/client/dist/$1;
+ }
+
+ location ~ ^/static/(thumbnails|avatars)/(.*)$ {
+ add_header Cache-Control "public, max-age=31536000, immutable";
+
+ alias /home/yunohost.app/__NAME__/storage/$1/$2;
+ }
+
+ location / {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
- proxy_pass http://localhost:9000;
+ proxy_pass http://localhost:__PORT__;
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
+ # Hard limit, PeerTube does not support videos > 4GB
client_max_body_size 4G;
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+ send_timeout 600;
}
- # Bypass PeerTube webseed route for better performances
- location /static/webseed {
+ # Bypass PeerTube webseed route for better performances
+ location /static/webseed {
+ # Clients usually have 4 simultaneous webseed connections, so the real limit is 3MB/s per client
+ limit_rate 800k;
+
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
@@ -27,9 +46,12 @@ location / {
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';
+
+ # Don't spam access log file with byte range requests
+ access_log off;
}
- alias __FINALPATH__/videos;
+ alias /home/yunohost.app/__NAME__/storage/videos;
}
# Websocket tracker
@@ -42,5 +64,5 @@ location / {
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;
+ proxy_pass http://localhost:__PORT__;
}
diff --git a/conf/production.yaml b/conf/production.yaml
index 8102f3f..2599f2d 100644
--- a/conf/production.yaml
+++ b/conf/production.yaml
@@ -1,5 +1,5 @@
listen:
- port: 9000
+ port: __PORT__
# Correspond to your reverse proxy "listen" configuration
webserver:
@@ -11,8 +11,8 @@ webserver:
database:
hostname: 'localhost'
port: 5432
- suffix: '_prod'
- username: 'peertube'
+ suffix: '___db_name__'
+ username: '__db_name__'
password: '__db_pwd__'
# Your object store
@@ -21,22 +21,45 @@ redis:
port: 6379
auth: null
+# SMTP server to send emails
+smtp:
+ hostname: null
+ port: 465
+ username: null
+ password: null
+ tls: true
+ disable_starttls: false
+ ca_file: null # Used for self signed certificates
+ from_address: 'admin@__domain__'
+
# From the project root directory
storage:
- avatars: 'avatars/'
- videos: 'videos/'
- logs: 'logs/'
- previews: 'previews/'
- thumbnails: 'thumbnails/'
- torrents: 'torrents/'
- cache: 'cache/'
+ avatars: '/home/yunohost.app/__app__/storage/avatars/'
+ videos: '/home/yunohost.app/__app__/storage/videos/'
+ logs: '/home/yunohost.app/__app__/storage/logs/'
+ previews: '/home/yunohost.app/__app__/storage/previews/'
+ thumbnails: '/home/yunohost.app/__app__/storage/thumbnails/'
+ torrents: '/home/yunohost.app/__app__/storage/torrents/'
+ cache: '/home/yunohost.app/__app__/storage/cache/'
log:
level: 'info' # debug/info/warning/error
+###############################################################################
+#
+# From this point, all the following keys can be overriden by the web interface
+# (local-production.json file). If you need to change some values, prefer to
+# use the web interface because the configuration will be automatically
+# reloaded without any need to restart PeerTube.
+#
+# /!\ If you already have a local-production.json file, the modification of the
+# following keys will have no effect /!\.
+#
+###############################################################################
+
cache:
previews:
- size: 1 # Max number of previews you want to cache
+ size: 100 # Max number of previews you want to cache
admin:
email: '__email__'
@@ -62,10 +85,13 @@ transcoding:
720p: true
1080p: true
+# Instance settings
instance:
name: 'PeerTube'
- description: 'Welcome to this PeerTube instance!' # Support markdown
- terms: 'No terms for now.' # Support markdown
+ short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
+ description: '' # Support markdown
+ terms: '' # Support markdown
+ default_client_route: '/videos/trending'
customizations:
javascript: '' # Directly your JavaScript code (without