diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/development/release.md | 2 | ||||
-rw-r--r-- | support/doc/plugins/guide.md | 10 | ||||
-rw-r--r-- | support/doc/tools.md | 17 | ||||
-rw-r--r-- | support/systemd/peertube.service | 2 |
4 files changed, 29 insertions, 2 deletions
diff --git a/support/doc/development/release.md b/support/doc/development/release.md index 39c2c5608..5cd735eda 100644 --- a/support/doc/development/release.md +++ b/support/doc/development/release.md | |||
@@ -19,4 +19,4 @@ NODE_APP_INSTANCE=6 NODE_ENV=test npm run start | |||
19 | * Check the release is okay: https://github.com/Chocobozzz/PeerTube/releases | 19 | * Check the release is okay: https://github.com/Chocobozzz/PeerTube/releases |
20 | * Update https://peertube3.cpy.re and check it works correctly | 20 | * Update https://peertube3.cpy.re and check it works correctly |
21 | * Update all other instances and check it works correctly | 21 | * Update all other instances and check it works correctly |
22 | * Communicate | 22 | * After a couple of days, update https://joinpeertube.org/api/v1/versions.json |
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index bc10e624d..20cbec5c7 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -22,6 +22,7 @@ | |||
22 | - [Custom Modal](#custom-modal) | 22 | - [Custom Modal](#custom-modal) |
23 | - [Translate](#translate) | 23 | - [Translate](#translate) |
24 | - [Get public settings](#get-public-settings) | 24 | - [Get public settings](#get-public-settings) |
25 | - [Get server config](#get-server-config) | ||
25 | - [Add custom fields to video form](#add-custom-fields-to-video-form) | 26 | - [Add custom fields to video form](#add-custom-fields-to-video-form) |
26 | - [Publishing](#publishing) | 27 | - [Publishing](#publishing) |
27 | - [Write a plugin/theme](#write-a-plugintheme) | 28 | - [Write a plugin/theme](#write-a-plugintheme) |
@@ -470,6 +471,15 @@ peertubeHelpers.getSettings() | |||
470 | }) | 471 | }) |
471 | ``` | 472 | ``` |
472 | 473 | ||
474 | #### Get server config | ||
475 | |||
476 | ```js | ||
477 | peertubeHelpers.getServerConfig() | ||
478 | .then(config => { | ||
479 | console.log('Fetched server config.', config) | ||
480 | }) | ||
481 | ``` | ||
482 | |||
473 | #### Add custom fields to video form | 483 | #### Add custom fields to video form |
474 | 484 | ||
475 | To add custom fields in the video form (in *Plugin settings* tab): | 485 | To add custom fields in the video form (in *Plugin settings* tab): |
diff --git a/support/doc/tools.md b/support/doc/tools.md index 452b3d039..175c22cd8 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -15,6 +15,7 @@ | |||
15 | - [peertube-redundancy.js](#peertube-redundancyjs) | 15 | - [peertube-redundancy.js](#peertube-redundancyjs) |
16 | - [Server tools](#server-tools) | 16 | - [Server tools](#server-tools) |
17 | - [parse-log](#parse-log) | 17 | - [parse-log](#parse-log) |
18 | - [regenerate-thumbnails.js](#regenerate-thumbnailsjs) | ||
18 | - [create-transcoding-job.js](#create-transcoding-jobjs) | 19 | - [create-transcoding-job.js](#create-transcoding-jobjs) |
19 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) | 20 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) |
20 | - [prune-storage.js](#prune-storagejs) | 21 | - [prune-storage.js](#prune-storagejs) |
@@ -244,6 +245,22 @@ $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production | |||
244 | 245 | ||
245 | `--level` is optional and could be `info`/`warn`/`error` | 246 | `--level` is optional and could be `info`/`warn`/`error` |
246 | 247 | ||
248 | You can also remove SQL or HTTP logs using `--not-tags`: | ||
249 | |||
250 | ``` | ||
251 | $ cd /var/www/peertube/peertube-latest | ||
252 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level debug --not-tags http sql | ||
253 | ``` | ||
254 | |||
255 | ### regenerate-thumbnails.js | ||
256 | |||
257 | Regenerating local video thumbnails could be useful because new PeerTube releases may increase thumbnail sizes: | ||
258 | |||
259 | ``` | ||
260 | $ cd /var/www/peertube/peertube-latest | ||
261 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run regenerate-thumbnails | ||
262 | ``` | ||
263 | |||
247 | ### create-transcoding-job.js | 264 | ### create-transcoding-job.js |
248 | 265 | ||
249 | You can use this script to force transcoding of an existing video. PeerTube needs to be running. | 266 | You can use this script to force transcoding of an existing video. PeerTube needs to be running. |
diff --git a/support/systemd/peertube.service b/support/systemd/peertube.service index cf4e7b417..bdeb76b51 100644 --- a/support/systemd/peertube.service +++ b/support/systemd/peertube.service | |||
@@ -8,7 +8,7 @@ Environment=NODE_ENV=production | |||
8 | Environment=NODE_CONFIG_DIR=/var/www/peertube/config | 8 | Environment=NODE_CONFIG_DIR=/var/www/peertube/config |
9 | User=peertube | 9 | User=peertube |
10 | Group=peertube | 10 | Group=peertube |
11 | ExecStart=/usr/bin/npm start | 11 | ExecStart=/usr/bin/node dist/server |
12 | WorkingDirectory=/var/www/peertube/peertube-latest | 12 | WorkingDirectory=/var/www/peertube/peertube-latest |
13 | StandardOutput=syslog | 13 | StandardOutput=syslog |
14 | StandardError=syslog | 14 | StandardError=syslog |