diff options
-rw-r--r-- | server/tests/api/notifications/moderation-notifications.ts | 22 | ||||
-rw-r--r-- | support/doc/production.md | 34 |
2 files changed, 31 insertions, 25 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts index b127a7a31..df239f92e 100644 --- a/server/tests/api/notifications/moderation-notifications.ts +++ b/server/tests/api/notifications/moderation-notifications.ts | |||
@@ -34,7 +34,7 @@ describe('Test moderation notifications', function () { | |||
34 | let emails: object[] = [] | 34 | let emails: object[] = [] |
35 | 35 | ||
36 | before(async function () { | 36 | before(async function () { |
37 | this.timeout(120000) | 37 | this.timeout(50000) |
38 | 38 | ||
39 | const res = await prepareNotificationsTest(3) | 39 | const res = await prepareNotificationsTest(3) |
40 | emails = res.emails | 40 | emails = res.emails |
@@ -60,7 +60,7 @@ describe('Test moderation notifications', function () { | |||
60 | }) | 60 | }) |
61 | 61 | ||
62 | it('Should not send a notification to moderators on local abuse reported by an admin', async function () { | 62 | it('Should not send a notification to moderators on local abuse reported by an admin', async function () { |
63 | this.timeout(20000) | 63 | this.timeout(50000) |
64 | 64 | ||
65 | const name = 'video for abuse ' + buildUUID() | 65 | const name = 'video for abuse ' + buildUUID() |
66 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) | 66 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) |
@@ -72,7 +72,7 @@ describe('Test moderation notifications', function () { | |||
72 | }) | 72 | }) |
73 | 73 | ||
74 | it('Should send a notification to moderators on local video abuse', async function () { | 74 | it('Should send a notification to moderators on local video abuse', async function () { |
75 | this.timeout(20000) | 75 | this.timeout(50000) |
76 | 76 | ||
77 | const name = 'video for abuse ' + buildUUID() | 77 | const name = 'video for abuse ' + buildUUID() |
78 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) | 78 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) |
@@ -84,7 +84,7 @@ describe('Test moderation notifications', function () { | |||
84 | }) | 84 | }) |
85 | 85 | ||
86 | it('Should send a notification to moderators on remote video abuse', async function () { | 86 | it('Should send a notification to moderators on remote video abuse', async function () { |
87 | this.timeout(20000) | 87 | this.timeout(50000) |
88 | 88 | ||
89 | const name = 'video for abuse ' + buildUUID() | 89 | const name = 'video for abuse ' + buildUUID() |
90 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) | 90 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) |
@@ -99,7 +99,7 @@ describe('Test moderation notifications', function () { | |||
99 | }) | 99 | }) |
100 | 100 | ||
101 | it('Should send a notification to moderators on local comment abuse', async function () { | 101 | it('Should send a notification to moderators on local comment abuse', async function () { |
102 | this.timeout(20000) | 102 | this.timeout(50000) |
103 | 103 | ||
104 | const name = 'video for abuse ' + buildUUID() | 104 | const name = 'video for abuse ' + buildUUID() |
105 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) | 105 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) |
@@ -118,7 +118,7 @@ describe('Test moderation notifications', function () { | |||
118 | }) | 118 | }) |
119 | 119 | ||
120 | it('Should send a notification to moderators on remote comment abuse', async function () { | 120 | it('Should send a notification to moderators on remote comment abuse', async function () { |
121 | this.timeout(20000) | 121 | this.timeout(50000) |
122 | 122 | ||
123 | const name = 'video for abuse ' + buildUUID() | 123 | const name = 'video for abuse ' + buildUUID() |
124 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) | 124 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } }) |
@@ -140,7 +140,7 @@ describe('Test moderation notifications', function () { | |||
140 | }) | 140 | }) |
141 | 141 | ||
142 | it('Should send a notification to moderators on local account abuse', async function () { | 142 | it('Should send a notification to moderators on local account abuse', async function () { |
143 | this.timeout(20000) | 143 | this.timeout(50000) |
144 | 144 | ||
145 | const username = 'user' + new Date().getTime() | 145 | const username = 'user' + new Date().getTime() |
146 | const { account } = await servers[0].users.create({ username, password: 'donald' }) | 146 | const { account } = await servers[0].users.create({ username, password: 'donald' }) |
@@ -153,7 +153,7 @@ describe('Test moderation notifications', function () { | |||
153 | }) | 153 | }) |
154 | 154 | ||
155 | it('Should send a notification to moderators on remote account abuse', async function () { | 155 | it('Should send a notification to moderators on remote account abuse', async function () { |
156 | this.timeout(20000) | 156 | this.timeout(50000) |
157 | 157 | ||
158 | const username = 'user' + new Date().getTime() | 158 | const username = 'user' + new Date().getTime() |
159 | const tmpToken = await servers[0].users.generateUserAndToken(username) | 159 | const tmpToken = await servers[0].users.generateUserAndToken(username) |
@@ -500,7 +500,7 @@ describe('Test moderation notifications', function () { | |||
500 | }) | 500 | }) |
501 | 501 | ||
502 | it('Should send notification to moderators on new video with auto-blacklist', async function () { | 502 | it('Should send notification to moderators on new video with auto-blacklist', async function () { |
503 | this.timeout(120000) | 503 | this.timeout(50000) |
504 | 504 | ||
505 | videoName = 'video with auto-blacklist ' + buildUUID() | 505 | videoName = 'video with auto-blacklist ' + buildUUID() |
506 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } }) | 506 | const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } }) |
@@ -545,7 +545,7 @@ describe('Test moderation notifications', function () { | |||
545 | }) | 545 | }) |
546 | 546 | ||
547 | it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { | 547 | it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { |
548 | this.timeout(120000) | 548 | this.timeout(50000) |
549 | 549 | ||
550 | const updateAt = new Date(new Date().getTime() + 1000000) | 550 | const updateAt = new Date(new Date().getTime() + 1000000) |
551 | 551 | ||
@@ -601,7 +601,7 @@ describe('Test moderation notifications', function () { | |||
601 | }) | 601 | }) |
602 | 602 | ||
603 | it('Should not send a notification to moderators on new video without auto-blacklist', async function () { | 603 | it('Should not send a notification to moderators on new video without auto-blacklist', async function () { |
604 | this.timeout(120000) | 604 | this.timeout(50000) |
605 | 605 | ||
606 | const name = 'video without auto-blacklist ' + buildUUID() | 606 | const name = 'video without auto-blacklist ' + buildUUID() |
607 | 607 | ||
diff --git a/support/doc/production.md b/support/doc/production.md index dd57e9120..9a84f19a3 100644 --- a/support/doc/production.md +++ b/support/doc/production.md | |||
@@ -177,16 +177,17 @@ $ sudo vim /etc/letsencrypt/renewal/your-domain.com.conf | |||
177 | 177 | ||
178 | If you plan to have many concurrent viewers on your PeerTube instance, consider increasing `worker_connections` value: https://nginx.org/en/docs/ngx_core_module.html#worker_connections. | 178 | If you plan to have many concurrent viewers on your PeerTube instance, consider increasing `worker_connections` value: https://nginx.org/en/docs/ngx_core_module.html#worker_connections. |
179 | 179 | ||
180 | **FreeBSD** | 180 | <details> |
181 | <summary><strong>If using FreeBSD</strong></summary> | ||
182 | |||
181 | On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/) | 183 | On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/) |
182 | 184 | ||
183 | ```bash | 185 | ```bash |
184 | $ sudo pkg install dehydrated | 186 | $ sudo pkg install dehydrated |
185 | ``` | 187 | ``` |
188 | </details> | ||
186 | 189 | ||
187 | ### :alembic: TCP/IP Tuning | 190 | ### :alembic: Linux TCP/IP Tuning |
188 | |||
189 | **On Linux** | ||
190 | 191 | ||
191 | ```bash | 192 | ```bash |
192 | $ sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/ | 193 | $ sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/ |
@@ -231,7 +232,9 @@ $ sudo systemctl start peertube | |||
231 | $ sudo journalctl -feu peertube | 232 | $ sudo journalctl -feu peertube |
232 | ``` | 233 | ``` |
233 | 234 | ||
234 | **FreeBSD** | 235 | <details> |
236 | <summary><strong>If using FreeBSD</strong></summary> | ||
237 | |||
235 | On FreeBSD, copy the startup script and update rc.conf: | 238 | On FreeBSD, copy the startup script and update rc.conf: |
236 | 239 | ||
237 | ```bash | 240 | ```bash |
@@ -244,8 +247,10 @@ Run: | |||
244 | ```bash | 247 | ```bash |
245 | $ sudo service peertube start | 248 | $ sudo service peertube start |
246 | ``` | 249 | ``` |
250 | </details> | ||
247 | 251 | ||
248 | ### :bricks: OpenRC | 252 | <details> |
253 | <summary><strong>If using OpenRC</strong></summary> | ||
249 | 254 | ||
250 | If your OS uses OpenRC, copy the service script: | 255 | If your OS uses OpenRC, copy the service script: |
251 | 256 | ||
@@ -265,6 +270,7 @@ Run and print last logs: | |||
265 | $ sudo /etc/init.d/peertube start | 270 | $ sudo /etc/init.d/peertube start |
266 | $ tail -f /var/log/peertube/peertube.log | 271 | $ tail -f /var/log/peertube/peertube.log |
267 | ``` | 272 | ``` |
273 | </details> | ||
268 | 274 | ||
269 | ### :technologist: Administrator | 275 | ### :technologist: Administrator |
270 | 276 | ||
@@ -291,16 +297,15 @@ Now your instance is up you can: | |||
291 | 297 | ||
292 | **Check the changelog (in particular the *IMPORTANT NOTES* section):** https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md | 298 | **Check the changelog (in particular the *IMPORTANT NOTES* section):** https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md |
293 | 299 | ||
294 | #### Auto | 300 | Run the upgrade script (the password it asks is PeerTube's database user password): |
295 | |||
296 | The password it asks is PeerTube's database user password. | ||
297 | 301 | ||
298 | ```bash | 302 | ```bash |
299 | $ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh | 303 | $ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh |
300 | $ sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd | 304 | $ sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd |
301 | ``` | 305 | ``` |
302 | 306 | ||
303 | #### Manually | 307 | <details> |
308 | <summary><strong>Prefer manual upgrade?</strong></summary> | ||
304 | 309 | ||
305 | Make a SQL backup | 310 | Make a SQL backup |
306 | 311 | ||
@@ -346,17 +351,18 @@ $ cd /var/www/peertube && \ | |||
346 | sudo unlink ./peertube-latest && \ | 351 | sudo unlink ./peertube-latest && \ |
347 | sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest | 352 | sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest |
348 | ``` | 353 | ``` |
354 | </details> | ||
349 | 355 | ||
350 | ### Configuration | 356 | ### Update PeerTube configuration |
351 | 357 | ||
352 | You can check for configuration changes, and report them in your `config/production.yaml` file: | 358 | Check for configuration changes, and report them in your `config/production.yaml` file: |
353 | 359 | ||
354 | ```bash | 360 | ```bash |
355 | $ cd /var/www/peertube/versions | 361 | $ cd /var/www/peertube/versions |
356 | $ diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example" | 362 | $ diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example" |
357 | ``` | 363 | ``` |
358 | 364 | ||
359 | ### nginx | 365 | ### Update nginx configuration |
360 | 366 | ||
361 | Check changes in nginx configuration: | 367 | Check changes in nginx configuration: |
362 | 368 | ||
@@ -365,7 +371,7 @@ $ cd /var/www/peertube/versions | |||
365 | $ diff -u "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --sort=t | head -1)/support/nginx/peertube" | 371 | $ diff -u "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --sort=t | head -1)/support/nginx/peertube" |
366 | ``` | 372 | ``` |
367 | 373 | ||
368 | ### systemd | 374 | ### Update systemd service |
369 | 375 | ||
370 | Check changes in systemd configuration: | 376 | Check changes in systemd configuration: |
371 | 377 | ||