aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml132
-rw-r--r--support/doc/dependencies.md21
-rw-r--r--support/doc/development/release.md2
-rw-r--r--support/doc/plugins/guide.md10
-rw-r--r--support/doc/tools.md17
-rw-r--r--support/docker/production/config/custom-environment-variables.yaml4
-rw-r--r--support/systemd/peertube.service2
7 files changed, 179 insertions, 9 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index a47654f69..373b17ddf 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -974,7 +974,10 @@ paths:
974 content: 974 content:
975 application/json: 975 application/json:
976 schema: 976 schema:
977 $ref: '#/components/schemas/Avatar' 977 type: object
978 properties:
979 avatar:
980 $ref: '#/components/schemas/ActorImage'
978 '413': 981 '413':
979 description: image file too large 982 description: image file too large
980 headers: 983 headers:
@@ -996,6 +999,17 @@ paths:
996 encoding: 999 encoding:
997 avatarfile: 1000 avatarfile:
998 contentType: image/png, image/jpeg 1001 contentType: image/png, image/jpeg
1002 /users/me/avatar:
1003 delete:
1004 summary: Delete my avatar
1005 security:
1006 - OAuth2: []
1007 tags:
1008 - My User
1009 responses:
1010 '204':
1011 description: successful operation
1012
999 /videos/ownership: 1013 /videos/ownership:
1000 get: 1014 get:
1001 summary: List video ownership changes 1015 summary: List video ownership changes
@@ -2185,6 +2199,112 @@ paths:
2185 application/json: 2199 application/json:
2186 schema: 2200 schema:
2187 $ref: '#/components/schemas/VideoListResponse' 2201 $ref: '#/components/schemas/VideoListResponse'
2202 '/video-channels/{channelHandle}/avatar/pick':
2203 post:
2204 summary: Update channel avatar
2205 security:
2206 - OAuth2: []
2207 tags:
2208 - Video Channels
2209 parameters:
2210 - $ref: '#/components/parameters/channelHandle'
2211 responses:
2212 '200':
2213 description: successful operation
2214 content:
2215 application/json:
2216 schema:
2217 type: object
2218 properties:
2219 avatar:
2220 $ref: '#/components/schemas/ActorImage'
2221 '413':
2222 description: image file too large
2223 headers:
2224 X-File-Maximum-Size:
2225 schema:
2226 type: string
2227 format: Nginx size
2228 description: Maximum file size for the avatar
2229 requestBody:
2230 content:
2231 multipart/form-data:
2232 schema:
2233 type: object
2234 properties:
2235 avatarfile:
2236 description: The file to upload.
2237 type: string
2238 format: binary
2239 encoding:
2240 avatarfile:
2241 contentType: image/png, image/jpeg
2242 '/video-channels/{channelHandle}/avatar':
2243 delete:
2244 summary: Delete channel avatar
2245 security:
2246 - OAuth2: []
2247 tags:
2248 - Video Channels
2249 parameters:
2250 - $ref: '#/components/parameters/channelHandle'
2251 responses:
2252 '204':
2253 description: successful operation
2254
2255
2256 '/video-channels/{channelHandle}/banner/pick':
2257 post:
2258 summary: Update channel banner
2259 security:
2260 - OAuth2: []
2261 tags:
2262 - Video Channels
2263 parameters:
2264 - $ref: '#/components/parameters/channelHandle'
2265 responses:
2266 '200':
2267 description: successful operation
2268 content:
2269 application/json:
2270 schema:
2271 type: object
2272 properties:
2273 banner:
2274 $ref: '#/components/schemas/ActorImage'
2275 '413':
2276 description: image file too large
2277 headers:
2278 X-File-Maximum-Size:
2279 schema:
2280 type: string
2281 format: Nginx size
2282 description: Maximum file size for the banner
2283 requestBody:
2284 content:
2285 multipart/form-data:
2286 schema:
2287 type: object
2288 properties:
2289 bannerfile:
2290 description: The file to upload.
2291 type: string
2292 format: binary
2293 encoding:
2294 bannerfile:
2295 contentType: image/png, image/jpeg
2296 '/video-channels/{channelHandle}/banner':
2297 delete:
2298 summary: Delete channel banner
2299 security:
2300 - OAuth2: []
2301 tags:
2302 - Video Channels
2303 parameters:
2304 - $ref: '#/components/parameters/channelHandle'
2305 responses:
2306 '204':
2307 description: successful operation
2188 2308
2189 /video-playlists/privacies: 2309 /video-playlists/privacies:
2190 get: 2310 get:
@@ -3989,7 +4109,7 @@ components:
3989 avatar: 4109 avatar:
3990 nullable: true 4110 nullable: true
3991 allOf: 4111 allOf:
3992 - $ref: '#/components/schemas/Avatar' 4112 - $ref: '#/components/schemas/ActorImage'
3993 VideoChannelSummary: 4113 VideoChannelSummary:
3994 properties: 4114 properties:
3995 id: 4115 id:
@@ -4007,7 +4127,7 @@ components:
4007 avatar: 4127 avatar:
4008 nullable: true 4128 nullable: true
4009 allOf: 4129 allOf:
4010 - $ref: '#/components/schemas/Avatar' 4130 - $ref: '#/components/schemas/ActorImage'
4011 PlaylistElement: 4131 PlaylistElement:
4012 properties: 4132 properties:
4013 position: 4133 position:
@@ -4460,7 +4580,7 @@ components:
4460 $ref: '#/components/schemas/VideoConstantString' 4580 $ref: '#/components/schemas/VideoConstantString'
4461 captionPath: 4581 captionPath:
4462 type: string 4582 type: string
4463 Avatar: 4583 ActorImage:
4464 properties: 4584 properties:
4465 path: 4585 path:
4466 type: string 4586 type: string
@@ -4512,7 +4632,7 @@ components:
4512 type: string 4632 type: string
4513 format: date-time 4633 format: date-time
4514 avatar: 4634 avatar:
4515 $ref: '#/components/schemas/Avatar' 4635 $ref: '#/components/schemas/ActorImage'
4516 Account: 4636 Account:
4517 allOf: 4637 allOf:
4518 - $ref: '#/components/schemas/Actor' 4638 - $ref: '#/components/schemas/Actor'
@@ -5694,6 +5814,8 @@ components:
5694 description: User can stream multiple times in a permanent live 5814 description: User can stream multiple times in a permanent live
5695 type: boolean 5815 type: boolean
5696 5816
5817
5818
5697 callbacks: 5819 callbacks:
5698 searchIndex: 5820 searchIndex:
5699 'https://search.example.org/api/v1/search/videos': 5821 'https://search.example.org/api/v1/search/videos':
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 0fdbdfc82..9666d72af 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -281,17 +281,34 @@ service nginx start
281 281
2821. Add the packages: 2821. Add the packages:
283 283
284```sh
285brew install bash ffmpeg nginx postgresql openssl gcc make redis git yarn
284``` 286```
285brew install ffmpeg nginx postgresql openssl gcc make redis git yarn 287
288You may need to update your default version of bash.
289
290**How to change your default shell**
291
292```sh
293which -a bash # Check where bash is installed
294bash --version # You need a version at least as recent as 4.0
295sudo vim /etc/shells # Add in this file : /usr/local/bin/bash
296chsh -s /usr/local/bin/bash # To set the brew-installed bash as default bash
286``` 297```
287 298
299In a new shell, type `bash --version` to assert your changes took effect and
300correctly modified your default bash version.
301
2882. Run the services: 3022. Run the services:
289 303
290``` 304```sh
291brew services run postgresql 305brew services run postgresql
292brew services run redis 306brew services run redis
293``` 307```
294 308
309On macOS, the `postgresql` user can be `_postgres` instead of `postgres`.
310If `sudo -u postgres createuser -P peertube` gives you an error, you can try `sudo -u _postgres createuser -U peertube`.
311
295## Gentoo 312## Gentoo
296 313
2971. Add this to ``/etc/portage/sets/peertube``: 3141. Add this to ``/etc/portage/sets/peertube``:
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
477peertubeHelpers.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
475To add custom fields in the video form (in *Plugin settings* tab): 485To 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
248You 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
257Regenerating 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
249You can use this script to force transcoding of an existing video. PeerTube needs to be running. 266You can use this script to force transcoding of an existing video. PeerTube needs to be running.
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml
index 63459d8a0..8226715e0 100644
--- a/support/docker/production/config/custom-environment-variables.yaml
+++ b/support/docker/production/config/custom-environment-variables.yaml
@@ -117,6 +117,10 @@ transcoding:
117 2160p: 117 2160p:
118 __name: "PEERTUBE_TRANSCODING_2160P" 118 __name: "PEERTUBE_TRANSCODING_2160P"
119 __format: "json" 119 __format: "json"
120 webtorrent:
121 enabled:
122 __name: "PEERTUBE_TRANSCODING_WEBTORRENT_ENABLED"
123 __format: "json"
120 hls: 124 hls:
121 enabled: 125 enabled:
122 __name: "PEERTUBE_TRANSCODING_HLS_ENABLED" 126 __name: "PEERTUBE_TRANSCODING_HLS_ENABLED"
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
8Environment=NODE_CONFIG_DIR=/var/www/peertube/config 8Environment=NODE_CONFIG_DIR=/var/www/peertube/config
9User=peertube 9User=peertube
10Group=peertube 10Group=peertube
11ExecStart=/usr/bin/npm start 11ExecStart=/usr/bin/node dist/server
12WorkingDirectory=/var/www/peertube/peertube-latest 12WorkingDirectory=/var/www/peertube/peertube-latest
13StandardOutput=syslog 13StandardOutput=syslog
14StandardError=syslog 14StandardError=syslog