mirror of https://github.com/Chocobozzz/PeerTube
Improve upgrade documentation
parent
5070a99560
commit
7a07da01c4
|
@ -34,7 +34,7 @@ describe('Test moderation notifications', function () {
|
||||||
let emails: object[] = []
|
let emails: object[] = []
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
this.timeout(120000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const res = await prepareNotificationsTest(3)
|
const res = await prepareNotificationsTest(3)
|
||||||
emails = res.emails
|
emails = res.emails
|
||||||
|
@ -60,7 +60,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should not send a notification to moderators on local abuse reported by an admin', async function () {
|
it('Should not send a notification to moderators on local abuse reported by an admin', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video for abuse ' + buildUUID()
|
const name = 'video for abuse ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
||||||
|
@ -72,7 +72,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on local video abuse', async function () {
|
it('Should send a notification to moderators on local video abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video for abuse ' + buildUUID()
|
const name = 'video for abuse ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
||||||
|
@ -84,7 +84,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on remote video abuse', async function () {
|
it('Should send a notification to moderators on remote video abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video for abuse ' + buildUUID()
|
const name = 'video for abuse ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
||||||
|
@ -99,7 +99,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on local comment abuse', async function () {
|
it('Should send a notification to moderators on local comment abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video for abuse ' + buildUUID()
|
const name = 'video for abuse ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
||||||
|
@ -118,7 +118,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on remote comment abuse', async function () {
|
it('Should send a notification to moderators on remote comment abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video for abuse ' + buildUUID()
|
const name = 'video for abuse ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name } })
|
||||||
|
@ -140,7 +140,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on local account abuse', async function () {
|
it('Should send a notification to moderators on local account abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const username = 'user' + new Date().getTime()
|
const username = 'user' + new Date().getTime()
|
||||||
const { account } = await servers[0].users.create({ username, password: 'donald' })
|
const { account } = await servers[0].users.create({ username, password: 'donald' })
|
||||||
|
@ -153,7 +153,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send a notification to moderators on remote account abuse', async function () {
|
it('Should send a notification to moderators on remote account abuse', async function () {
|
||||||
this.timeout(20000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const username = 'user' + new Date().getTime()
|
const username = 'user' + new Date().getTime()
|
||||||
const tmpToken = await servers[0].users.generateUserAndToken(username)
|
const tmpToken = await servers[0].users.generateUserAndToken(username)
|
||||||
|
@ -500,7 +500,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send notification to moderators on new video with auto-blacklist', async function () {
|
it('Should send notification to moderators on new video with auto-blacklist', async function () {
|
||||||
this.timeout(120000)
|
this.timeout(50000)
|
||||||
|
|
||||||
videoName = 'video with auto-blacklist ' + buildUUID()
|
videoName = 'video with auto-blacklist ' + buildUUID()
|
||||||
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } })
|
const video = await servers[0].videos.upload({ token: userToken1, attributes: { name: videoName } })
|
||||||
|
@ -545,7 +545,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () {
|
it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () {
|
||||||
this.timeout(120000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const updateAt = new Date(new Date().getTime() + 1000000)
|
const updateAt = new Date(new Date().getTime() + 1000000)
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ describe('Test moderation notifications', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
|
it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
|
||||||
this.timeout(120000)
|
this.timeout(50000)
|
||||||
|
|
||||||
const name = 'video without auto-blacklist ' + buildUUID()
|
const name = 'video without auto-blacklist ' + buildUUID()
|
||||||
|
|
||||||
|
|
|
@ -177,16 +177,17 @@ $ sudo vim /etc/letsencrypt/renewal/your-domain.com.conf
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
**FreeBSD**
|
<details>
|
||||||
|
<summary><strong>If using FreeBSD</strong></summary>
|
||||||
|
|
||||||
On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/)
|
On FreeBSD you can use [Dehydrated](https://dehydrated.io/) `security/dehydrated` for [Let's Encrypt](https://letsencrypt.org/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo pkg install dehydrated
|
$ sudo pkg install dehydrated
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
### :alembic: TCP/IP Tuning
|
### :alembic: Linux TCP/IP Tuning
|
||||||
|
|
||||||
**On Linux**
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo cp /var/www/peertube/peertube-latest/support/sysctl.d/30-peertube-tcp.conf /etc/sysctl.d/
|
$ 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
|
||||||
$ sudo journalctl -feu peertube
|
$ sudo journalctl -feu peertube
|
||||||
```
|
```
|
||||||
|
|
||||||
**FreeBSD**
|
<details>
|
||||||
|
<summary><strong>If using FreeBSD</strong></summary>
|
||||||
|
|
||||||
On FreeBSD, copy the startup script and update rc.conf:
|
On FreeBSD, copy the startup script and update rc.conf:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -244,8 +247,10 @@ Run:
|
||||||
```bash
|
```bash
|
||||||
$ sudo service peertube start
|
$ sudo service peertube start
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
### :bricks: OpenRC
|
<details>
|
||||||
|
<summary><strong>If using OpenRC</strong></summary>
|
||||||
|
|
||||||
If your OS uses OpenRC, copy the service script:
|
If your OS uses OpenRC, copy the service script:
|
||||||
|
|
||||||
|
@ -265,6 +270,7 @@ Run and print last logs:
|
||||||
$ sudo /etc/init.d/peertube start
|
$ sudo /etc/init.d/peertube start
|
||||||
$ tail -f /var/log/peertube/peertube.log
|
$ tail -f /var/log/peertube/peertube.log
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
### :technologist: Administrator
|
### :technologist: Administrator
|
||||||
|
|
||||||
|
@ -291,16 +297,15 @@ Now your instance is up you can:
|
||||||
|
|
||||||
**Check the changelog (in particular the *IMPORTANT NOTES* section):** https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md
|
**Check the changelog (in particular the *IMPORTANT NOTES* section):** https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md
|
||||||
|
|
||||||
#### Auto
|
Run the upgrade script (the password it asks is PeerTube's database user password):
|
||||||
|
|
||||||
The password it asks is PeerTube's database user password.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh
|
$ cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh
|
||||||
$ sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd
|
$ sudo systemctl restart peertube # Or use your OS command to restart PeerTube if you don't use systemd
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Manually
|
<details>
|
||||||
|
<summary><strong>Prefer manual upgrade?</strong></summary>
|
||||||
|
|
||||||
Make a SQL backup
|
Make a SQL backup
|
||||||
|
|
||||||
|
@ -346,17 +351,18 @@ $ cd /var/www/peertube && \
|
||||||
sudo unlink ./peertube-latest && \
|
sudo unlink ./peertube-latest && \
|
||||||
sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
|
sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
### Configuration
|
### Update PeerTube configuration
|
||||||
|
|
||||||
You can check for configuration changes, and report them in your `config/production.yaml` file:
|
Check for configuration changes, and report them in your `config/production.yaml` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd /var/www/peertube/versions
|
$ cd /var/www/peertube/versions
|
||||||
$ diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example"
|
$ diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$(ls --sort=t | head -1)/config/production.yaml.example"
|
||||||
```
|
```
|
||||||
|
|
||||||
### nginx
|
### Update nginx configuration
|
||||||
|
|
||||||
Check changes in nginx configuration:
|
Check changes in nginx configuration:
|
||||||
|
|
||||||
|
@ -365,7 +371,7 @@ $ cd /var/www/peertube/versions
|
||||||
$ diff -u "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --sort=t | head -1)/support/nginx/peertube"
|
$ diff -u "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --sort=t | head -1)/support/nginx/peertube"
|
||||||
```
|
```
|
||||||
|
|
||||||
### systemd
|
### Update systemd service
|
||||||
|
|
||||||
Check changes in systemd configuration:
|
Check changes in systemd configuration:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue