diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-04 09:16:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-04-04 09:18:06 +0200 |
commit | 00ee545c2444c35ed0d37df9f91984246aa36124 (patch) | |
tree | 823ab6b93d9b144bc60adef5c69739b0e8fed808 /support | |
parent | b5f38b78984c69fd2b4270c50ed58a708174b935 (diff) | |
download | PeerTube-00ee545c2444c35ed0d37df9f91984246aa36124.tar.gz PeerTube-00ee545c2444c35ed0d37df9f91984246aa36124.tar.zst PeerTube-00ee545c2444c35ed0d37df9f91984246aa36124.zip |
Remove $ for bash commands
It prevents easy copy
Diffstat (limited to 'support')
-rw-r--r-- | support/doc/api/quickstart.md | 8 | ||||
-rw-r--r-- | support/doc/development/lib.md | 12 | ||||
-rw-r--r-- | support/doc/development/localization.md | 2 | ||||
-rw-r--r-- | support/doc/development/monitoring.md | 6 | ||||
-rw-r--r-- | support/doc/development/tests.md | 26 | ||||
-rw-r--r-- | support/doc/docker.md | 18 | ||||
-rw-r--r-- | support/doc/plugins/guide.md | 30 | ||||
-rw-r--r-- | support/doc/production.md | 152 | ||||
-rw-r--r-- | support/doc/tools.md | 222 |
9 files changed, 238 insertions, 238 deletions
diff --git a/support/doc/api/quickstart.md b/support/doc/api/quickstart.md index 677745969..3a34a1429 100644 --- a/support/doc/api/quickstart.md +++ b/support/doc/api/quickstart.md | |||
@@ -7,7 +7,7 @@ | |||
7 | Some endpoints need authentication. We use OAuth 2.0 so first fetch the client tokens: | 7 | Some endpoints need authentication. We use OAuth 2.0 so first fetch the client tokens: |
8 | 8 | ||
9 | ```bash | 9 | ```bash |
10 | $ curl https://peertube.example.com/api/v1/oauth-clients/local | 10 | curl https://peertube.example.com/api/v1/oauth-clients/local |
11 | ``` | 11 | ``` |
12 | 12 | ||
13 | Response example: | 13 | Response example: |
@@ -24,7 +24,7 @@ Response example: | |||
24 | Now you can fetch the user token: | 24 | Now you can fetch the user token: |
25 | 25 | ||
26 | ```bash | 26 | ```bash |
27 | $ curl -X POST \ | 27 | curl -X POST \ |
28 | -d "client_id=v1ikx5hnfop4mdpnci8nsqh93c45rldf&client_secret=AjWiOapPltI6EnsWQwlFarRtLh4u8tDt&grant_type=password&response_type=code&username=your_user&password=your_password" \ | 28 | -d "client_id=v1ikx5hnfop4mdpnci8nsqh93c45rldf&client_secret=AjWiOapPltI6EnsWQwlFarRtLh4u8tDt&grant_type=password&response_type=code&username=your_user&password=your_password" \ |
29 | https://peertube.example.com/api/v1/users/token | 29 | https://peertube.example.com/api/v1/users/token |
30 | ``` | 30 | ``` |
@@ -43,14 +43,14 @@ Response example: | |||
43 | Just use the `access_token` in the `Authorization` header: | 43 | Just use the `access_token` in the `Authorization` header: |
44 | 44 | ||
45 | ```bash | 45 | ```bash |
46 | $ curl -H 'Authorization: Bearer 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0' https://peertube.example.com/api/v1/jobs/completed | 46 | curl -H 'Authorization: Bearer 90286a0bdf0f7315d9d3fe8dabf9e1d2be9c97d0' https://peertube.example.com/api/v1/jobs/completed |
47 | ``` | 47 | ``` |
48 | 48 | ||
49 | 49 | ||
50 | ## List videos | 50 | ## List videos |
51 | 51 | ||
52 | ```bash | 52 | ```bash |
53 | $ curl https://peertube.example.com/api/v1/videos | 53 | curl https://peertube.example.com/api/v1/videos |
54 | ``` | 54 | ``` |
55 | 55 | ||
56 | ## Libraries | 56 | ## Libraries |
diff --git a/support/doc/development/lib.md b/support/doc/development/lib.md index c43edbacc..3cccaf3d0 100644 --- a/support/doc/development/lib.md +++ b/support/doc/development/lib.md | |||
@@ -5,9 +5,9 @@ | |||
5 | ### Build & Publish | 5 | ### Build & Publish |
6 | 6 | ||
7 | ``` | 7 | ``` |
8 | $ cd client/src/standalone/player/ | 8 | cd client/src/standalone/player/ |
9 | $ npm run build | 9 | npm run build |
10 | $ npm publish --access=public | 10 | npm publish --access=public |
11 | ``` | 11 | ``` |
12 | 12 | ||
13 | ## @peertube/peertube-types | 13 | ## @peertube/peertube-types |
@@ -17,9 +17,9 @@ Typescript definition files generation is controlled by the various `tsconfig.ty | |||
17 | The complete types package is generated via: | 17 | The complete types package is generated via: |
18 | 18 | ||
19 | ``` | 19 | ``` |
20 | $ npm run generate-types-package 4.x.x | 20 | npm run generate-types-package 4.x.x |
21 | $ cd packages/types/dist | 21 | cd packages/types/dist |
22 | $ npm publish --access=public | 22 | npm publish --access=public |
23 | ``` | 23 | ``` |
24 | 24 | ||
25 | > See [scripts/generate-types-package.ts](scripts/generate-types-package.ts) for details. | 25 | > See [scripts/generate-types-package.ts](scripts/generate-types-package.ts) for details. |
diff --git a/support/doc/development/localization.md b/support/doc/development/localization.md index 3021d3659..a38ed6f55 100644 --- a/support/doc/development/localization.md +++ b/support/doc/development/localization.md | |||
@@ -9,7 +9,7 @@ Will generate XLIFF base files for Angular (`angular.xlf`) and JSON files for th | |||
9 | Then, it will merge new translation keys into localized Angular files (`angular.fr-FR.xlf` etc). | 9 | Then, it will merge new translation keys into localized Angular files (`angular.fr-FR.xlf` etc). |
10 | 10 | ||
11 | ``` | 11 | ``` |
12 | $ npm run i18n:update | 12 | npm run i18n:update |
13 | ``` | 13 | ``` |
14 | 14 | ||
15 | 15 | ||
diff --git a/support/doc/development/monitoring.md b/support/doc/development/monitoring.md index 9dcc2d563..93fd1403e 100644 --- a/support/doc/development/monitoring.md +++ b/support/doc/development/monitoring.md | |||
@@ -5,7 +5,7 @@ | |||
5 | To open a report of client build: | 5 | To open a report of client build: |
6 | 6 | ||
7 | ``` | 7 | ``` |
8 | $ npm run build -- --analyze-bundle && npm run client-report | 8 | npm run build -- --analyze-bundle && npm run client-report |
9 | ``` | 9 | ``` |
10 | 10 | ||
11 | ## API benchmark | 11 | ## API benchmark |
@@ -13,11 +13,11 @@ $ npm run build -- --analyze-bundle && npm run client-report | |||
13 | To benchmark the REST API and save result in `benchmark.json`: | 13 | To benchmark the REST API and save result in `benchmark.json`: |
14 | 14 | ||
15 | ``` | 15 | ``` |
16 | $ node dist/scripts/benchmark.js -o benchmark.json | 16 | node dist/scripts/benchmark.js -o benchmark.json |
17 | ``` | 17 | ``` |
18 | 18 | ||
19 | You can also grep on a specific test: | 19 | You can also grep on a specific test: |
20 | 20 | ||
21 | ``` | 21 | ``` |
22 | $ node dist/scripts/benchmark.js --grep homepage | 22 | node dist/scripts/benchmark.js --grep homepage |
23 | ``` | 23 | ``` |
diff --git a/support/doc/development/tests.md b/support/doc/development/tests.md index 6eb499f0c..c4935b70d 100644 --- a/support/doc/development/tests.md +++ b/support/doc/development/tests.md | |||
@@ -5,19 +5,19 @@ | |||
5 | Prepare PostgreSQL user so PeerTube can delete/create the test databases: | 5 | Prepare PostgreSQL user so PeerTube can delete/create the test databases: |
6 | 6 | ||
7 | ```bash | 7 | ```bash |
8 | $ sudo -u postgres createuser you_username --createdb --superuser | 8 | sudo -u postgres createuser you_username --createdb --superuser |
9 | ``` | 9 | ``` |
10 | 10 | ||
11 | Prepare databases: | 11 | Prepare databases: |
12 | 12 | ||
13 | ```bash | 13 | ```bash |
14 | $ npm run clean:server:test | 14 | npm run clean:server:test |
15 | ``` | 15 | ``` |
16 | 16 | ||
17 | Build PeerTube: | 17 | Build PeerTube: |
18 | 18 | ||
19 | ```bash | 19 | ```bash |
20 | $ npm run build | 20 | npm run build |
21 | ``` | 21 | ``` |
22 | 22 | ||
23 | ## Server tests | 23 | ## Server tests |
@@ -27,20 +27,20 @@ $ npm run build | |||
27 | Run docker containers needed by some test files: | 27 | Run docker containers needed by some test files: |
28 | 28 | ||
29 | ```bash | 29 | ```bash |
30 | $ sudo docker run -p 9444:9000 chocobozzz/s3-ninja | 30 | sudo docker run -p 9444:9000 chocobozzz/s3-ninja |
31 | $ sudo docker run -p 10389:10389 chocobozzz/docker-test-openldap | 31 | sudo docker run -p 10389:10389 chocobozzz/docker-test-openldap |
32 | ``` | 32 | ``` |
33 | 33 | ||
34 | Ensure you also have these commands: | 34 | Ensure you also have these commands: |
35 | 35 | ||
36 | ```bash | 36 | ```bash |
37 | $ exiftool --help | 37 | exiftool --help |
38 | $ parallel --help | 38 | parallel --help |
39 | ``` | 39 | ``` |
40 | 40 | ||
41 | Otherwise, install the packages. On Debian-based systems (like Debian, Ubuntu or Mint): | 41 | Otherwise, install the packages. On Debian-based systems (like Debian, Ubuntu or Mint): |
42 | ```bash | 42 | ```bash |
43 | $ sudo apt-get install parallel libimage-exiftool-perl | 43 | sudo apt-get install parallel libimage-exiftool-perl |
44 | ``` | 44 | ``` |
45 | 45 | ||
46 | ### Test | 46 | ### Test |
@@ -48,7 +48,7 @@ $ sudo apt-get install parallel libimage-exiftool-perl | |||
48 | To run all test suites: | 48 | To run all test suites: |
49 | 49 | ||
50 | ```bash | 50 | ```bash |
51 | $ npm run test # See scripts/test.sh to run a particular suite | 51 | npm run test # See scripts/test.sh to run a particular suite |
52 | ``` | 52 | ``` |
53 | 53 | ||
54 | Most of tests can be run using: | 54 | Most of tests can be run using: |
@@ -100,7 +100,7 @@ tail -f test1/logs/peertube.log | npm run parse-log -- --level debug --files - | |||
100 | To run tests on local web browsers (comment web browsers you don't have in `client/e2e/wdio.local.conf.ts`): | 100 | To run tests on local web browsers (comment web browsers you don't have in `client/e2e/wdio.local.conf.ts`): |
101 | 101 | ||
102 | ```bash | 102 | ```bash |
103 | $ PEERTUBE2_E2E_PASSWORD=password npm run e2e:local | 103 | PEERTUBE2_E2E_PASSWORD=password npm run e2e:local |
104 | ``` | 104 | ``` |
105 | 105 | ||
106 | ### Browserstack tests | 106 | ### Browserstack tests |
@@ -108,7 +108,7 @@ $ PEERTUBE2_E2E_PASSWORD=password npm run e2e:local | |||
108 | To run tests on browser stack: | 108 | To run tests on browser stack: |
109 | 109 | ||
110 | ```bash | 110 | ```bash |
111 | $ BROWSERSTACK_USER=your_user BROWSERSTACK_KEY=your_key npm run e2e:browserstack | 111 | BROWSERSTACK_USER=your_user BROWSERSTACK_KEY=your_key npm run e2e:browserstack |
112 | ``` | 112 | ``` |
113 | 113 | ||
114 | ### Add E2E tests | 114 | ### Add E2E tests |
@@ -116,6 +116,6 @@ $ BROWSERSTACK_USER=your_user BROWSERSTACK_KEY=your_key npm run e2e:browserstack | |||
116 | To add E2E tests and quickly run tests using a local Chrome: | 116 | To add E2E tests and quickly run tests using a local Chrome: |
117 | 117 | ||
118 | ```bash | 118 | ```bash |
119 | $ cd client/e2e | 119 | cd client/e2e |
120 | $ ../node_modules/.bin/wdio wdio.local-test.conf.ts # you can also add --mochaOpts.grep to only run tests you want | 120 | ../node_modules/.bin/wdio wdio.local-test.conf.ts # you can also add --mochaOpts.grep to only run tests you want |
121 | ``` | 121 | ``` |
diff --git a/support/doc/docker.md b/support/doc/docker.md index e3f9b5477..5d950d477 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md | |||
@@ -97,7 +97,7 @@ docker-compose exec -u peertube peertube npm run reset-password -- -u root | |||
97 | You can also grep your peertube container's logs for the default `root` password. You're going to want to run `docker-compose logs peertube | grep -A1 root` to search the log output for your new PeerTube's instance admin credentials which will look something like this. | 97 | You can also grep your peertube container's logs for the default `root` password. You're going to want to run `docker-compose logs peertube | grep -A1 root` to search the log output for your new PeerTube's instance admin credentials which will look something like this. |
98 | 98 | ||
99 | ```bash | 99 | ```bash |
100 | $ docker-compose logs peertube | grep -A1 root | 100 | docker-compose logs peertube | grep -A1 root |
101 | 101 | ||
102 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root | 102 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root |
103 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abcdefghijklmnop | 103 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abcdefghijklmnop |
@@ -110,7 +110,7 @@ peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abc | |||
110 | Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain : | 110 | Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain : |
111 | 111 | ||
112 | ```bash | 112 | ```bash |
113 | $ cat ./docker-volume/opendkim/keys/*/*.txt | 113 | cat ./docker-volume/opendkim/keys/*/*.txt |
114 | 114 | ||
115 | peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; " | 115 | peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; " |
116 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Dx7wLGPFVaxVQ4TGym/eF89aQ8oMxS9v5BCc26Hij91t2Ci8Fl12DHNVqZoIPGm+9tTIoDVDFEFrlPhMOZl8i4jU9pcFjjaIISaV2+qTa8uV1j3MyByogG8pu4o5Ill7zaySYFsYB++cHJ9pjbFSC42dddCYMfuVgrBsLNrvEi3dLDMjJF5l92Uu8YeswFe26PuHX3Avr261n" | 116 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Dx7wLGPFVaxVQ4TGym/eF89aQ8oMxS9v5BCc26Hij91t2Ci8Fl12DHNVqZoIPGm+9tTIoDVDFEFrlPhMOZl8i4jU9pcFjjaIISaV2+qTa8uV1j3MyByogG8pu4o5Ill7zaySYFsYB++cHJ9pjbFSC42dddCYMfuVgrBsLNrvEi3dLDMjJF5l92Uu8YeswFe26PuHX3Avr261n" |
@@ -132,20 +132,20 @@ See the production guide ["What now" section](https://docs.joinpeertube.org/inst | |||
132 | Pull the latest images: | 132 | Pull the latest images: |
133 | 133 | ||
134 | ```shell | 134 | ```shell |
135 | $ cd /your/peertube/directory | 135 | cd /your/peertube/directory |
136 | $ docker-compose pull | 136 | docker-compose pull |
137 | ``` | 137 | ``` |
138 | 138 | ||
139 | Stop, delete the containers and internal volumes (to invalidate static client files shared by `peertube` and `webserver` containers): | 139 | Stop, delete the containers and internal volumes (to invalidate static client files shared by `peertube` and `webserver` containers): |
140 | 140 | ||
141 | ```shell | 141 | ```shell |
142 | $ docker-compose down -v | 142 | docker-compose down -v |
143 | ``` | 143 | ``` |
144 | 144 | ||
145 | Rerun PeerTube: | 145 | Rerun PeerTube: |
146 | 146 | ||
147 | ```shell | 147 | ```shell |
148 | $ docker-compose up -d | 148 | docker-compose up -d |
149 | ``` | 149 | ``` |
150 | 150 | ||
151 | ## Build | 151 | ## Build |
@@ -153,9 +153,9 @@ $ docker-compose up -d | |||
153 | ### Production | 153 | ### Production |
154 | 154 | ||
155 | ```shell | 155 | ```shell |
156 | $ git clone https://github.com/chocobozzz/PeerTube /tmp/peertube | 156 | git clone https://github.com/chocobozzz/PeerTube /tmp/peertube |
157 | $ cd /tmp/peertube | 157 | cd /tmp/peertube |
158 | $ docker build . -f ./support/docker/production/Dockerfile.bullseye | 158 | docker build . -f ./support/docker/production/Dockerfile.bullseye |
159 | ``` | 159 | ``` |
160 | 160 | ||
161 | ### Development | 161 | ### Development |
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index c5e3236ca..73f58330c 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -947,13 +947,13 @@ Steps: | |||
947 | If you develop a plugin, clone the `peertube-plugin-quickstart` repository: | 947 | If you develop a plugin, clone the `peertube-plugin-quickstart` repository: |
948 | 948 | ||
949 | ``` | 949 | ``` |
950 | $ git clone https://framagit.org/framasoft/peertube/peertube-plugin-quickstart.git peertube-plugin-mysupername | 950 | git clone https://framagit.org/framasoft/peertube/peertube-plugin-quickstart.git peertube-plugin-mysupername |
951 | ``` | 951 | ``` |
952 | 952 | ||
953 | If you develop a theme, clone the `peertube-theme-quickstart` repository: | 953 | If you develop a theme, clone the `peertube-theme-quickstart` repository: |
954 | 954 | ||
955 | ``` | 955 | ``` |
956 | $ git clone https://framagit.org/framasoft/peertube/peertube-theme-quickstart.git peertube-theme-mysupername | 956 | git clone https://framagit.org/framasoft/peertube/peertube-theme-quickstart.git peertube-theme-mysupername |
957 | ``` | 957 | ``` |
958 | 958 | ||
959 | ### Configure your repository | 959 | ### Configure your repository |
@@ -961,8 +961,8 @@ $ git clone https://framagit.org/framasoft/peertube/peertube-theme-quickstart.gi | |||
961 | Set your repository URL: | 961 | Set your repository URL: |
962 | 962 | ||
963 | ``` | 963 | ``` |
964 | $ cd peertube-plugin-mysupername # or cd peertube-theme-mysupername | 964 | cd peertube-plugin-mysupername # or cd peertube-theme-mysupername |
965 | $ git remote set-url origin https://your-git-repo | 965 | git remote set-url origin https://your-git-repo |
966 | ``` | 966 | ``` |
967 | 967 | ||
968 | ### Update README | 968 | ### Update README |
@@ -970,7 +970,7 @@ $ git remote set-url origin https://your-git-repo | |||
970 | Update `README.md` file: | 970 | Update `README.md` file: |
971 | 971 | ||
972 | ``` | 972 | ``` |
973 | $ $EDITOR README.md | 973 | $EDITOR README.md |
974 | ``` | 974 | ``` |
975 | 975 | ||
976 | ### Update package.json | 976 | ### Update package.json |
@@ -1100,19 +1100,19 @@ If you added client scripts, you'll need to build them using webpack. | |||
1100 | Install webpack: | 1100 | Install webpack: |
1101 | 1101 | ||
1102 | ``` | 1102 | ``` |
1103 | $ npm install | 1103 | npm install |
1104 | ``` | 1104 | ``` |
1105 | 1105 | ||
1106 | Add/update your files in the `clientFiles` array of `webpack.config.js`: | 1106 | Add/update your files in the `clientFiles` array of `webpack.config.js`: |
1107 | 1107 | ||
1108 | ``` | 1108 | ``` |
1109 | $ $EDITOR ./webpack.config.js | 1109 | $EDITOR ./webpack.config.js |
1110 | ``` | 1110 | ``` |
1111 | 1111 | ||
1112 | Build your client files: | 1112 | Build your client files: |
1113 | 1113 | ||
1114 | ``` | 1114 | ``` |
1115 | $ npm run build | 1115 | npm run build |
1116 | ``` | 1116 | ``` |
1117 | 1117 | ||
1118 | You built files are in the `dist/` directory. Check `package.json` to correctly point to them. | 1118 | You built files are in the `dist/` directory. Check `package.json` to correctly point to them. |
@@ -1129,31 +1129,31 @@ You'll need to have a local PeerTube instance: | |||
1129 | * Build PeerTube: | 1129 | * Build PeerTube: |
1130 | 1130 | ||
1131 | ``` | 1131 | ``` |
1132 | $ npm run build | 1132 | npm run build |
1133 | ``` | 1133 | ``` |
1134 | 1134 | ||
1135 | * Build the CLI: | 1135 | * Build the CLI: |
1136 | 1136 | ||
1137 | ``` | 1137 | ``` |
1138 | $ npm run setup:cli | 1138 | npm run setup:cli |
1139 | ``` | 1139 | ``` |
1140 | 1140 | ||
1141 | * Run PeerTube (you can access to your instance on `localhost:9000`): | 1141 | * Run PeerTube (you can access to your instance on `localhost:9000`): |
1142 | 1142 | ||
1143 | ``` | 1143 | ``` |
1144 | $ NODE_ENV=dev npm start | 1144 | NODE_ENV=dev npm start |
1145 | ``` | 1145 | ``` |
1146 | 1146 | ||
1147 | * Register the instance via the CLI: | 1147 | * Register the instance via the CLI: |
1148 | 1148 | ||
1149 | ``` | 1149 | ``` |
1150 | $ node ./dist/server/tools/peertube.js auth add -u 'http://localhost:9000' -U 'root' --password 'test' | 1150 | node ./dist/server/tools/peertube.js auth add -u 'http://localhost:9000' -U 'root' --password 'test' |
1151 | ``` | 1151 | ``` |
1152 | 1152 | ||
1153 | Then, you can install or reinstall your local plugin/theme by running: | 1153 | Then, you can install or reinstall your local plugin/theme by running: |
1154 | 1154 | ||
1155 | ``` | 1155 | ``` |
1156 | $ node ./dist/server/tools/peertube.js plugins install --path /your/absolute/plugin-or-theme/path | 1156 | node ./dist/server/tools/peertube.js plugins install --path /your/absolute/plugin-or-theme/path |
1157 | ``` | 1157 | ``` |
1158 | 1158 | ||
1159 | ### Publish | 1159 | ### Publish |
@@ -1161,7 +1161,7 @@ $ node ./dist/server/tools/peertube.js plugins install --path /your/absolute/plu | |||
1161 | Go in your plugin/theme directory, and run: | 1161 | Go in your plugin/theme directory, and run: |
1162 | 1162 | ||
1163 | ``` | 1163 | ``` |
1164 | $ npm publish | 1164 | npm publish |
1165 | ``` | 1165 | ``` |
1166 | 1166 | ||
1167 | Every time you want to publish another version of your plugin/theme, just update the `version` key from the `package.json` | 1167 | Every time you want to publish another version of your plugin/theme, just update the `version` key from the `package.json` |
@@ -1179,7 +1179,7 @@ If for a particular reason you don't want to maintain your plugin/theme anymore | |||
1179 | you can deprecate it. The plugin index will automatically remove it preventing users to find/install it from the PeerTube admin interface: | 1179 | you can deprecate it. The plugin index will automatically remove it preventing users to find/install it from the PeerTube admin interface: |
1180 | 1180 | ||
1181 | ```bash | 1181 | ```bash |
1182 | $ npm deprecate peertube-plugin-xxx@"> 0.0.0" "explain here why you deprecate your plugin/theme" | 1182 | npm deprecate peertube-plugin-xxx@"> 0.0.0" "explain here why you deprecate your plugin/theme" |
1183 | ``` | 1183 | ``` |
1184 | 1184 | ||
1185 | ## Plugin & Theme hooks/helpers API | 1185 | ## Plugin & Theme hooks/helpers API |
diff --git a/support/doc/production.md b/support/doc/production.md index 74bd3a673..30db453e0 100644 --- a/support/doc/production.md +++ b/support/doc/production.md | |||
@@ -17,25 +17,25 @@ Follow the steps of the [dependencies guide](/support/doc/dependencies.md). | |||
17 | Create a `peertube` user with `/var/www/peertube` home: | 17 | Create a `peertube` user with `/var/www/peertube` home: |
18 | 18 | ||
19 | ```bash | 19 | ```bash |
20 | $ sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube | 20 | sudo useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube |
21 | ``` | 21 | ``` |
22 | 22 | ||
23 | Set its password: | 23 | Set its password: |
24 | ```bash | 24 | ```bash |
25 | $ sudo passwd peertube | 25 | sudo passwd peertube |
26 | ``` | 26 | ``` |
27 | 27 | ||
28 | Ensure the peertube root directory is traversable by nginx: | 28 | Ensure the peertube root directory is traversable by nginx: |
29 | 29 | ||
30 | ```bash | 30 | ```bash |
31 | $ ls -ld /var/www/peertube # Should be drwxr-xr-x | 31 | ls -ld /var/www/peertube # Should be drwxr-xr-x |
32 | ``` | 32 | ``` |
33 | 33 | ||
34 | **On FreeBSD** | 34 | **On FreeBSD** |
35 | 35 | ||
36 | ```bash | 36 | ```bash |
37 | $ sudo pw useradd -n peertube -d /var/www/peertube -s /usr/local/bin/bash -m | 37 | sudo pw useradd -n peertube -d /var/www/peertube -s /usr/local/bin/bash -m |
38 | $ sudo passwd peertube | 38 | sudo passwd peertube |
39 | ``` | 39 | ``` |
40 | or use `adduser` to create it interactively. | 40 | or use `adduser` to create it interactively. |
41 | 41 | ||
@@ -44,22 +44,22 @@ or use `adduser` to create it interactively. | |||
44 | Create the production database and a peertube user inside PostgreSQL: | 44 | Create the production database and a peertube user inside PostgreSQL: |
45 | 45 | ||
46 | ```bash | 46 | ```bash |
47 | $ cd /var/www/peertube | 47 | cd /var/www/peertube |
48 | $ sudo -u postgres createuser -P peertube | 48 | sudo -u postgres createuser -P peertube |
49 | ``` | 49 | ``` |
50 | 50 | ||
51 | Here you should enter a password for PostgreSQL `peertube` user, that should be copied in `production.yaml` file. | 51 | Here you should enter a password for PostgreSQL `peertube` user, that should be copied in `production.yaml` file. |
52 | Don't just hit enter else it will be empty. | 52 | Don't just hit enter else it will be empty. |
53 | 53 | ||
54 | ```bash | 54 | ```bash |
55 | $ sudo -u postgres createdb -O peertube -E UTF8 -T template0 peertube_prod | 55 | sudo -u postgres createdb -O peertube -E UTF8 -T template0 peertube_prod |
56 | ``` | 56 | ``` |
57 | 57 | ||
58 | Then enable extensions PeerTube needs: | 58 | Then enable extensions PeerTube needs: |
59 | 59 | ||
60 | ```bash | 60 | ```bash |
61 | $ sudo -u postgres psql -c "CREATE EXTENSION pg_trgm;" peertube_prod | 61 | sudo -u postgres psql -c "CREATE EXTENSION pg_trgm;" peertube_prod |
62 | $ sudo -u postgres psql -c "CREATE EXTENSION unaccent;" peertube_prod | 62 | sudo -u postgres psql -c "CREATE EXTENSION unaccent;" peertube_prod |
63 | ``` | 63 | ``` |
64 | 64 | ||
65 | ### :page_facing_up: Prepare PeerTube directory | 65 | ### :page_facing_up: Prepare PeerTube directory |
@@ -67,35 +67,35 @@ $ sudo -u postgres psql -c "CREATE EXTENSION unaccent;" peertube_prod | |||
67 | Fetch the latest tagged version of Peertube: | 67 | Fetch the latest tagged version of Peertube: |
68 | 68 | ||
69 | ```bash | 69 | ```bash |
70 | $ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION" | 70 | VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION" |
71 | ``` | 71 | ``` |
72 | 72 | ||
73 | 73 | ||
74 | Open the peertube directory, create a few required directories: | 74 | Open the peertube directory, create a few required directories: |
75 | 75 | ||
76 | ```bash | 76 | ```bash |
77 | $ cd /var/www/peertube | 77 | cd /var/www/peertube |
78 | $ sudo -u peertube mkdir config storage versions | 78 | sudo -u peertube mkdir config storage versions |
79 | $ sudo -u peertube chmod 750 config/ | 79 | sudo -u peertube chmod 750 config/ |
80 | ``` | 80 | ``` |
81 | 81 | ||
82 | 82 | ||
83 | Download the latest version of the Peertube client, unzip it and remove the zip: | 83 | Download the latest version of the Peertube client, unzip it and remove the zip: |
84 | 84 | ||
85 | ```bash | 85 | ```bash |
86 | $ cd /var/www/peertube/versions | 86 | cd /var/www/peertube/versions |
87 | $ # Releases are also available on https://builds.joinpeertube.org/release | 87 | # Releases are also available on https://builds.joinpeertube.org/release |
88 | $ sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" | 88 | sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" |
89 | $ sudo -u peertube unzip -q peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip | 89 | sudo -u peertube unzip -q peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip |
90 | ``` | 90 | ``` |
91 | 91 | ||
92 | 92 | ||
93 | Install Peertube: | 93 | Install Peertube: |
94 | 94 | ||
95 | ```bash | 95 | ```bash |
96 | $ cd /var/www/peertube | 96 | cd /var/www/peertube |
97 | $ sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest | 97 | sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest |
98 | $ cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile | 98 | cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile |
99 | ``` | 99 | ``` |
100 | 100 | ||
101 | ### :wrench: PeerTube configuration | 101 | ### :wrench: PeerTube configuration |
@@ -104,15 +104,15 @@ Copy the default configuration file that contains the default configuration prov | |||
104 | You **must not** update this file. | 104 | You **must not** update this file. |
105 | 105 | ||
106 | ```bash | 106 | ```bash |
107 | $ cd /var/www/peertube | 107 | cd /var/www/peertube |
108 | $ sudo -u peertube cp peertube-latest/config/default.yaml config/default.yaml | 108 | sudo -u peertube cp peertube-latest/config/default.yaml config/default.yaml |
109 | ``` | 109 | ``` |
110 | 110 | ||
111 | Now copy the production example configuration: | 111 | Now copy the production example configuration: |
112 | 112 | ||
113 | ```bash | 113 | ```bash |
114 | $ cd /var/www/peertube | 114 | cd /var/www/peertube |
115 | $ sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml | 115 | sudo -u peertube cp peertube-latest/config/production.yaml.example config/production.yaml |
116 | ``` | 116 | ``` |
117 | 117 | ||
118 | Then edit the `config/production.yaml` file according to your webserver and database configuration. In particular: | 118 | Then edit the `config/production.yaml` file according to your webserver and database configuration. In particular: |
@@ -134,45 +134,45 @@ We only provide official configuration files for Nginx. | |||
134 | Copy the nginx configuration template: | 134 | Copy the nginx configuration template: |
135 | 135 | ||
136 | ```bash | 136 | ```bash |
137 | $ sudo cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube | 137 | sudo cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube |
138 | ``` | 138 | ``` |
139 | 139 | ||
140 | Then set the domain for the webserver configuration file. | 140 | Then set the domain for the webserver configuration file. |
141 | Replace `[peertube-domain]` with the domain for the peertube server. | 141 | Replace `[peertube-domain]` with the domain for the peertube server. |
142 | 142 | ||
143 | ```bash | 143 | ```bash |
144 | $ sudo sed -i 's/${WEBSERVER_HOST}/[peertube-domain]/g' /etc/nginx/sites-available/peertube | 144 | sudo sed -i 's/${WEBSERVER_HOST}/[peertube-domain]/g' /etc/nginx/sites-available/peertube |
145 | $ sudo sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube | 145 | sudo sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube |
146 | ``` | 146 | ``` |
147 | 147 | ||
148 | Then modify the webserver configuration file. Please pay attention to the `alias` keys of the static locations. | 148 | Then modify the webserver configuration file. Please pay attention to the `alias` keys of the static locations. |
149 | It should correspond to the paths of your storage directories (set in the configuration file inside the `storage` key). | 149 | It should correspond to the paths of your storage directories (set in the configuration file inside the `storage` key). |
150 | 150 | ||
151 | ```bash | 151 | ```bash |
152 | $ sudo vim /etc/nginx/sites-available/peertube | 152 | sudo vim /etc/nginx/sites-available/peertube |
153 | ``` | 153 | ``` |
154 | 154 | ||
155 | Activate the configuration file: | 155 | Activate the configuration file: |
156 | 156 | ||
157 | ```bash | 157 | ```bash |
158 | $ sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube | 158 | sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube |
159 | ``` | 159 | ``` |
160 | 160 | ||
161 | To generate the certificate for your domain as required to make https work you can use [Let's Encrypt](https://letsencrypt.org/): | 161 | To generate the certificate for your domain as required to make https work you can use [Let's Encrypt](https://letsencrypt.org/): |
162 | 162 | ||
163 | ```bash | 163 | ```bash |
164 | $ sudo systemctl stop nginx | 164 | sudo systemctl stop nginx |
165 | $ sudo certbot certonly --standalone --post-hook "systemctl restart nginx" | 165 | sudo certbot certonly --standalone --post-hook "systemctl restart nginx" |
166 | $ sudo systemctl reload nginx | 166 | sudo systemctl reload nginx |
167 | ``` | 167 | ``` |
168 | 168 | ||
169 | Certbot should have installed a cron to automatically renew your certificate. | 169 | Certbot should have installed a cron to automatically renew your certificate. |
170 | Since our nginx template supports webroot renewal, we suggest you to update the renewal config file to use the `webroot` authenticator: | 170 | Since our nginx template supports webroot renewal, we suggest you to update the renewal config file to use the `webroot` authenticator: |
171 | 171 | ||
172 | ```bash | 172 | ```bash |
173 | $ # Replace authenticator = standalone by authenticator = webroot | 173 | # Replace authenticator = standalone by authenticator = webroot |
174 | $ # Add webroot_path = /var/www/certbot | 174 | # Add webroot_path = /var/www/certbot |
175 | $ sudo vim /etc/letsencrypt/renewal/your-domain.com.conf | 175 | sudo vim /etc/letsencrypt/renewal/your-domain.com.conf |
176 | ``` | 176 | ``` |
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. |
@@ -183,15 +183,15 @@ If you plan to have many concurrent viewers on your PeerTube instance, consider | |||
183 | 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/) |
184 | 184 | ||
185 | ```bash | 185 | ```bash |
186 | $ sudo pkg install dehydrated | 186 | sudo pkg install dehydrated |
187 | ``` | 187 | ``` |
188 | </details> | 188 | </details> |
189 | 189 | ||
190 | ### :alembic: Linux TCP/IP Tuning | 190 | ### :alembic: Linux TCP/IP Tuning |
191 | 191 | ||
192 | ```bash | 192 | ```bash |
193 | $ 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/ |
194 | $ sudo sysctl -p /etc/sysctl.d/30-peertube-tcp.conf | 194 | sudo sysctl -p /etc/sysctl.d/30-peertube-tcp.conf |
195 | ``` | 195 | ``` |
196 | 196 | ||
197 | Your distro may enable this by default, but at least Debian 9 does not, and the default FIFO | 197 | Your distro may enable this by default, but at least Debian 9 does not, and the default FIFO |
@@ -203,33 +203,33 @@ links as we often encounter in a video server. | |||
203 | If your OS uses systemd, copy the configuration template: | 203 | If your OS uses systemd, copy the configuration template: |
204 | 204 | ||
205 | ```bash | 205 | ```bash |
206 | $ sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/ | 206 | sudo cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/ |
207 | ``` | 207 | ``` |
208 | 208 | ||
209 | Check the service file (PeerTube paths and security directives): | 209 | Check the service file (PeerTube paths and security directives): |
210 | 210 | ||
211 | ```bash | 211 | ```bash |
212 | $ sudo vim /etc/systemd/system/peertube.service | 212 | sudo vim /etc/systemd/system/peertube.service |
213 | ``` | 213 | ``` |
214 | 214 | ||
215 | 215 | ||
216 | Tell systemd to reload its config: | 216 | Tell systemd to reload its config: |
217 | 217 | ||
218 | ```bash | 218 | ```bash |
219 | $ sudo systemctl daemon-reload | 219 | sudo systemctl daemon-reload |
220 | ``` | 220 | ``` |
221 | 221 | ||
222 | If you want to start PeerTube on boot: | 222 | If you want to start PeerTube on boot: |
223 | 223 | ||
224 | ```bash | 224 | ```bash |
225 | $ sudo systemctl enable peertube | 225 | sudo systemctl enable peertube |
226 | ``` | 226 | ``` |
227 | 227 | ||
228 | Run: | 228 | Run: |
229 | 229 | ||
230 | ```bash | 230 | ```bash |
231 | $ sudo systemctl start peertube | 231 | sudo systemctl start peertube |
232 | $ sudo journalctl -feu peertube | 232 | sudo journalctl -feu peertube |
233 | ``` | 233 | ``` |
234 | 234 | ||
235 | <details> | 235 | <details> |
@@ -238,14 +238,14 @@ $ sudo journalctl -feu peertube | |||
238 | On FreeBSD, copy the startup script and update rc.conf: | 238 | On FreeBSD, copy the startup script and update rc.conf: |
239 | 239 | ||
240 | ```bash | 240 | ```bash |
241 | $ sudo install -m 0555 /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/ | 241 | sudo install -m 0555 /var/www/peertube/peertube-latest/support/freebsd/peertube /usr/local/etc/rc.d/ |
242 | $ sudo sysrc peertube_enable="YES" | 242 | sudo sysrc peertube_enable="YES" |
243 | ``` | 243 | ``` |
244 | 244 | ||
245 | Run: | 245 | Run: |
246 | 246 | ||
247 | ```bash | 247 | ```bash |
248 | $ sudo service peertube start | 248 | sudo service peertube start |
249 | ``` | 249 | ``` |
250 | </details> | 250 | </details> |
251 | 251 | ||
@@ -255,20 +255,20 @@ $ sudo service peertube start | |||
255 | If your OS uses OpenRC, copy the service script: | 255 | If your OS uses OpenRC, copy the service script: |
256 | 256 | ||
257 | ```bash | 257 | ```bash |
258 | $ sudo cp /var/www/peertube/peertube-latest/support/init.d/peertube /etc/init.d/ | 258 | sudo cp /var/www/peertube/peertube-latest/support/init.d/peertube /etc/init.d/ |
259 | ``` | 259 | ``` |
260 | 260 | ||
261 | If you want to start PeerTube on boot: | 261 | If you want to start PeerTube on boot: |
262 | 262 | ||
263 | ```bash | 263 | ```bash |
264 | $ sudo rc-update add peertube default | 264 | sudo rc-update add peertube default |
265 | ``` | 265 | ``` |
266 | 266 | ||
267 | Run and print last logs: | 267 | Run and print last logs: |
268 | 268 | ||
269 | ```bash | 269 | ```bash |
270 | $ sudo /etc/init.d/peertube start | 270 | sudo /etc/init.d/peertube start |
271 | $ tail -f /var/log/peertube/peertube.log | 271 | tail -f /var/log/peertube/peertube.log |
272 | ``` | 272 | ``` |
273 | </details> | 273 | </details> |
274 | 274 | ||
@@ -278,7 +278,7 @@ The administrator username is `root` and the password is automatically generated | |||
278 | logs (path defined in `production.yaml`). You can also set another password with: | 278 | logs (path defined in `production.yaml`). You can also set another password with: |
279 | 279 | ||
280 | ```bash | 280 | ```bash |
281 | $ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root | 281 | cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root |
282 | ``` | 282 | ``` |
283 | 283 | ||
284 | Alternatively you can set the environment variable `PT_INITIAL_ROOT_PASSWORD`, | 284 | Alternatively you can set the environment variable `PT_INITIAL_ROOT_PASSWORD`, |
@@ -300,8 +300,8 @@ Now your instance is up you can: | |||
300 | Run the upgrade script (the password it asks is PeerTube's database user password): | 300 | Run the upgrade script (the password it asks is PeerTube's database user password): |
301 | 301 | ||
302 | ```bash | 302 | ```bash |
303 | $ 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 |
304 | $ 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 |
305 | ``` | 305 | ``` |
306 | 306 | ||
307 | <details> | 307 | <details> |
@@ -310,7 +310,7 @@ $ sudo systemctl restart peertube # Or use your OS command to restart PeerTube i | |||
310 | Make a SQL backup | 310 | Make a SQL backup |
311 | 311 | ||
312 | ```bash | 312 | ```bash |
313 | $ SQL_BACKUP_PATH="backup/sql-peertube_prod-$(date -Im).bak" && \ | 313 | SQL_BACKUP_PATH="backup/sql-peertube_prod-$(date -Im).bak" && \ |
314 | cd /var/www/peertube && sudo -u peertube mkdir -p backup && \ | 314 | cd /var/www/peertube && sudo -u peertube mkdir -p backup && \ |
315 | sudo -u postgres pg_dump -F c peertube_prod | sudo -u peertube tee "$SQL_BACKUP_PATH" >/dev/null | 315 | sudo -u postgres pg_dump -F c peertube_prod | sudo -u peertube tee "$SQL_BACKUP_PATH" >/dev/null |
316 | ``` | 316 | ``` |
@@ -318,13 +318,13 @@ $ SQL_BACKUP_PATH="backup/sql-peertube_prod-$(date -Im).bak" && \ | |||
318 | Fetch the latest tagged version of Peertube: | 318 | Fetch the latest tagged version of Peertube: |
319 | 319 | ||
320 | ```bash | 320 | ```bash |
321 | $ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION" | 321 | VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION" |
322 | ``` | 322 | ``` |
323 | 323 | ||
324 | Download the new version and unzip it: | 324 | Download the new version and unzip it: |
325 | 325 | ||
326 | ```bash | 326 | ```bash |
327 | $ cd /var/www/peertube/versions && \ | 327 | cd /var/www/peertube/versions && \ |
328 | sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ | 328 | sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ |
329 | sudo -u peertube unzip -o peertube-${VERSION}.zip && \ | 329 | sudo -u peertube unzip -o peertube-${VERSION}.zip && \ |
330 | sudo -u peertube rm peertube-${VERSION}.zip | 330 | sudo -u peertube rm peertube-${VERSION}.zip |
@@ -333,21 +333,21 @@ $ cd /var/www/peertube/versions && \ | |||
333 | Install node dependencies: | 333 | Install node dependencies: |
334 | 334 | ||
335 | ```bash | 335 | ```bash |
336 | $ cd /var/www/peertube/versions/peertube-${VERSION} && \ | 336 | cd /var/www/peertube/versions/peertube-${VERSION} && \ |
337 | sudo -H -u peertube yarn install --production --pure-lockfile | 337 | sudo -H -u peertube yarn install --production --pure-lockfile |
338 | ``` | 338 | ``` |
339 | 339 | ||
340 | Copy new configuration defaults values and update your configuration file: | 340 | Copy new configuration defaults values and update your configuration file: |
341 | 341 | ||
342 | ```bash | 342 | ```bash |
343 | $ sudo -u peertube cp /var/www/peertube/versions/peertube-${VERSION}/config/default.yaml /var/www/peertube/config/default.yaml | 343 | sudo -u peertube cp /var/www/peertube/versions/peertube-${VERSION}/config/default.yaml /var/www/peertube/config/default.yaml |
344 | $ diff -u /var/www/peertube/versions/peertube-${VERSION}/config/production.yaml.example /var/www/peertube/config/production.yaml | 344 | diff -u /var/www/peertube/versions/peertube-${VERSION}/config/production.yaml.example /var/www/peertube/config/production.yaml |
345 | ``` | 345 | ``` |
346 | 346 | ||
347 | Change the link to point to the latest version: | 347 | Change the link to point to the latest version: |
348 | 348 | ||
349 | ```bash | 349 | ```bash |
350 | $ cd /var/www/peertube && \ | 350 | cd /var/www/peertube && \ |
351 | sudo unlink ./peertube-latest && \ | 351 | sudo unlink ./peertube-latest && \ |
352 | sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest | 352 | sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest |
353 | ``` | 353 | ``` |
@@ -358,8 +358,8 @@ $ cd /var/www/peertube && \ | |||
358 | 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: |
359 | 359 | ||
360 | ```bash | 360 | ```bash |
361 | $ cd /var/www/peertube/versions | 361 | cd /var/www/peertube/versions |
362 | $ 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" |
363 | ``` | 363 | ``` |
364 | 364 | ||
365 | ### Update nginx configuration | 365 | ### Update nginx configuration |
@@ -367,8 +367,8 @@ $ diff -u "$(ls --sort=t | head -2 | tail -1)/config/production.yaml.example" "$ | |||
367 | Check changes in nginx configuration: | 367 | Check changes in nginx configuration: |
368 | 368 | ||
369 | ```bash | 369 | ```bash |
370 | $ cd /var/www/peertube/versions | 370 | cd /var/www/peertube/versions |
371 | $ 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" |
372 | ``` | 372 | ``` |
373 | 373 | ||
374 | ### Update systemd service | 374 | ### Update systemd service |
@@ -376,8 +376,8 @@ $ diff -u "$(ls --sort=t | head -2 | tail -1)/support/nginx/peertube" "$(ls --so | |||
376 | Check changes in systemd configuration: | 376 | Check changes in systemd configuration: |
377 | 377 | ||
378 | ```bash | 378 | ```bash |
379 | $ cd /var/www/peertube/versions | 379 | cd /var/www/peertube/versions |
380 | $ diff -u "$(ls --sort=t | head -2 | tail -1)/support/systemd/peertube.service" "$(ls --sort=t | head -1)/support/systemd/peertube.service" | 380 | diff -u "$(ls --sort=t | head -2 | tail -1)/support/systemd/peertube.service" "$(ls --sort=t | head -1)/support/systemd/peertube.service" |
381 | ``` | 381 | ``` |
382 | 382 | ||
383 | ### Restart PeerTube | 383 | ### Restart PeerTube |
@@ -385,19 +385,19 @@ $ diff -u "$(ls --sort=t | head -2 | tail -1)/support/systemd/peertube.service" | |||
385 | If you changed your nginx configuration: | 385 | If you changed your nginx configuration: |
386 | 386 | ||
387 | ```bash | 387 | ```bash |
388 | $ sudo systemctl reload nginx | 388 | sudo systemctl reload nginx |
389 | ``` | 389 | ``` |
390 | 390 | ||
391 | If you changed your systemd configuration: | 391 | If you changed your systemd configuration: |
392 | 392 | ||
393 | ```bash | 393 | ```bash |
394 | $ sudo systemctl daemon-reload | 394 | sudo systemctl daemon-reload |
395 | ``` | 395 | ``` |
396 | 396 | ||
397 | Restart PeerTube and check the logs: | 397 | Restart PeerTube and check the logs: |
398 | 398 | ||
399 | ```bash | 399 | ```bash |
400 | $ sudo systemctl restart peertube && sudo journalctl -fu peertube | 400 | sudo systemctl restart peertube && sudo journalctl -fu peertube |
401 | ``` | 401 | ``` |
402 | 402 | ||
403 | ### Things went wrong? | 403 | ### Things went wrong? |
@@ -405,9 +405,9 @@ $ sudo systemctl restart peertube && sudo journalctl -fu peertube | |||
405 | Change `peertube-latest` destination to the previous version and restore your SQL backup: | 405 | Change `peertube-latest` destination to the previous version and restore your SQL backup: |
406 | 406 | ||
407 | ```bash | 407 | ```bash |
408 | $ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \ | 408 | OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \ |
409 | cd /var/www/peertube && sudo -u peertube unlink ./peertube-latest && \ | 409 | cd /var/www/peertube && sudo -u peertube unlink ./peertube-latest && \ |
410 | sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \ | 410 | sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \ |
411 | sudo -u postgres pg_restore -c -C -d postgres "$SQL_BACKUP_PATH" && \ | 411 | sudo -u postgres pg_restore -c -C -d postgres "$SQL_BACKUP_PATH" && \ |
412 | sudo systemctl restart peertube | 412 | sudo systemctl restart peertube |
413 | ``` | 413 | ``` |
diff --git a/support/doc/tools.md b/support/doc/tools.md index 9a20ea64e..3b8eec4b1 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -40,16 +40,16 @@ Install the [PeerTube dependencies](/support/doc/dependencies.md) except Postgre | |||
40 | Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server): | 40 | Clone the PeerTube repo to get the latest version (even if you are on your PeerTube server): |
41 | 41 | ||
42 | ```bash | 42 | ```bash |
43 | $ git clone https://github.com/Chocobozzz/PeerTube.git | 43 | git clone https://github.com/Chocobozzz/PeerTube.git |
44 | $ CLONE="$(pwd)/PeerTube" | 44 | CLONE="$(pwd)/PeerTube" |
45 | $ cd ${CLONE} | 45 | cd ${CLONE} |
46 | ``` | 46 | ``` |
47 | 47 | ||
48 | Install dependencies and build CLI tools: | 48 | Install dependencies and build CLI tools: |
49 | 49 | ||
50 | ```bash | 50 | ```bash |
51 | $ NOCLIENT=1 yarn install --pure-lockfile | 51 | NOCLIENT=1 yarn install --pure-lockfile |
52 | $ npm run setup:cli | 52 | npm run setup:cli |
53 | ``` | 53 | ``` |
54 | 54 | ||
55 | ### CLI wrapper | 55 | ### CLI wrapper |
@@ -78,8 +78,8 @@ You can access it as `peertube` via an alias in your `.bashrc` like `alias peert | |||
78 | The wrapper can keep track of instances you have an account on. We limit to one account per instance for now. | 78 | The wrapper can keep track of instances you have an account on. We limit to one account per instance for now. |
79 | 79 | ||
80 | ```bash | 80 | ```bash |
81 | $ peertube auth add -u 'PEERTUBE_URL' -U 'PEERTUBE_USER' --password 'PEERTUBE_PASSWORD' | 81 | peertube auth add -u 'PEERTUBE_URL' -U 'PEERTUBE_USER' --password 'PEERTUBE_PASSWORD' |
82 | $ peertube auth list | 82 | peertube auth list |
83 | ┌──────────────────────────────┬──────────────────────────────┐ | 83 | ┌──────────────────────────────┬──────────────────────────────┐ |
84 | │ instance │ login │ | 84 | │ instance │ login │ |
85 | ├──────────────────────────────┼──────────────────────────────┤ | 85 | ├──────────────────────────────┼──────────────────────────────┤ |
@@ -90,16 +90,16 @@ $ peertube auth list | |||
90 | You can now use that account to upload videos without feeding the same parameters again. | 90 | You can now use that account to upload videos without feeding the same parameters again. |
91 | 91 | ||
92 | ```bash | 92 | ```bash |
93 | $ peertube up <videoFile> | 93 | peertube up <videoFile> |
94 | ``` | 94 | ``` |
95 | 95 | ||
96 | To list, install, uninstall dynamically plugins/themes of an instance: | 96 | To list, install, uninstall dynamically plugins/themes of an instance: |
97 | 97 | ||
98 | ```bash | 98 | ```bash |
99 | $ peertube plugins list | 99 | peertube plugins list |
100 | $ peertube plugins install --path /local/plugin/path | 100 | peertube plugins install --path /local/plugin/path |
101 | $ peertube plugins install --npm-name peertube-plugin-myplugin | 101 | peertube plugins install --npm-name peertube-plugin-myplugin |
102 | $ peertube plugins uninstall --npm-name peertube-plugin-myplugin | 102 | peertube plugins uninstall --npm-name peertube-plugin-myplugin |
103 | ``` | 103 | ``` |
104 | 104 | ||
105 | #### peertube-import-videos.js | 105 | #### peertube-import-videos.js |
@@ -108,7 +108,7 @@ You can use this script to import videos from all [supported sites of youtube-dl | |||
108 | Be sure you own the videos or have the author's authorization to do so. | 108 | Be sure you own the videos or have the author's authorization to do so. |
109 | 109 | ||
110 | ```sh | 110 | ```sh |
111 | $ node dist/server/tools/peertube-import-videos.js \ | 111 | node dist/server/tools/peertube-import-videos.js \ |
112 | -u 'PEERTUBE_URL' \ | 112 | -u 'PEERTUBE_URL' \ |
113 | -U 'PEERTUBE_USER' \ | 113 | -U 'PEERTUBE_USER' \ |
114 | --password 'PEERTUBE_PASSWORD' \ | 114 | --password 'PEERTUBE_PASSWORD' \ |
@@ -152,8 +152,8 @@ You can use this script to import videos directly from the CLI. | |||
152 | Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). | 152 | Videos will be publicly available after transcoding (you can see them before that in your account on the web interface). |
153 | 153 | ||
154 | ```bash | 154 | ```bash |
155 | $ cd ${CLONE} | 155 | cd ${CLONE} |
156 | $ node dist/server/tools/peertube-upload.js --help | 156 | node dist/server/tools/peertube-upload.js --help |
157 | ``` | 157 | ``` |
158 | 158 | ||
159 | #### peertube-plugins.js | 159 | #### peertube-plugins.js |
@@ -161,15 +161,15 @@ $ node dist/server/tools/peertube-upload.js --help | |||
161 | Install/update/uninstall or list local or NPM PeerTube plugins: | 161 | Install/update/uninstall or list local or NPM PeerTube plugins: |
162 | 162 | ||
163 | ```bash | 163 | ```bash |
164 | $ cd ${CLONE} | 164 | cd ${CLONE} |
165 | $ node dist/server/tools/peertube-plugins.js --help | 165 | node dist/server/tools/peertube-plugins.js --help |
166 | $ node dist/server/tools/peertube-plugins.js list --help | 166 | node dist/server/tools/peertube-plugins.js list --help |
167 | $ node dist/server/tools/peertube-plugins.js install --help | 167 | node dist/server/tools/peertube-plugins.js install --help |
168 | $ node dist/server/tools/peertube-plugins.js update --help | 168 | node dist/server/tools/peertube-plugins.js update --help |
169 | $ node dist/server/tools/peertube-plugins.js uninstall --help | 169 | node dist/server/tools/peertube-plugins.js uninstall --help |
170 | 170 | ||
171 | $ node dist/server/tools/peertube-plugins.js install --path /my/plugin/path | 171 | node dist/server/tools/peertube-plugins.js install --path /my/plugin/path |
172 | $ node dist/server/tools/peertube-plugins.js install --npm-name peertube-theme-example | 172 | node dist/server/tools/peertube-plugins.js install --npm-name peertube-theme-example |
173 | ``` | 173 | ``` |
174 | 174 | ||
175 | #### peertube-redundancy.js | 175 | #### peertube-redundancy.js |
@@ -179,25 +179,25 @@ Manage (list/add/remove) video redundancies: | |||
179 | To list your videos that are duplicated by remote instances: | 179 | To list your videos that are duplicated by remote instances: |
180 | 180 | ||
181 | ```bash | 181 | ```bash |
182 | $ node dist/server/tools/peertube.js redundancy list-remote-redundancies | 182 | node dist/server/tools/peertube.js redundancy list-remote-redundancies |
183 | ``` | 183 | ``` |
184 | 184 | ||
185 | To list remote videos that your instance duplicated: | 185 | To list remote videos that your instance duplicated: |
186 | 186 | ||
187 | ```bash | 187 | ```bash |
188 | $ node dist/server/tools/peertube.js redundancy list-my-redundancies | 188 | node dist/server/tools/peertube.js redundancy list-my-redundancies |
189 | ``` | 189 | ``` |
190 | 190 | ||
191 | To duplicate a specific video in your redundancy system: | 191 | To duplicate a specific video in your redundancy system: |
192 | 192 | ||
193 | ```bash | 193 | ```bash |
194 | $ node dist/server/tools/peertube.js redundancy add --video 823 | 194 | node dist/server/tools/peertube.js redundancy add --video 823 |
195 | ``` | 195 | ``` |
196 | 196 | ||
197 | To remove a video redundancy: | 197 | To remove a video redundancy: |
198 | 198 | ||
199 | ```bash | 199 | ```bash |
200 | $ node dist/server/tools/peertube.js redundancy remove --video 823 | 200 | node dist/server/tools/peertube.js redundancy remove --video 823 |
201 | ``` | 201 | ``` |
202 | 202 | ||
203 | ## Server tools | 203 | ## Server tools |
@@ -209,13 +209,13 @@ These scripts should be run on the server, in `peertube-latest` directory. | |||
209 | To parse PeerTube last log file: | 209 | To parse PeerTube last log file: |
210 | 210 | ||
211 | ```bash | 211 | ```bash |
212 | $ # Basic installation | 212 | # Basic installation |
213 | $ cd /var/www/peertube/peertube-latest | 213 | cd /var/www/peertube/peertube-latest |
214 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info | 214 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level info |
215 | 215 | ||
216 | $ # Docker installation | 216 | # Docker installation |
217 | $ cd /var/www/peertube-docker | 217 | cd /var/www/peertube-docker |
218 | $ docker-compose exec -u peertube peertube npm run parse-log -- --level info | 218 | docker-compose exec -u peertube peertube npm run parse-log -- --level info |
219 | ``` | 219 | ``` |
220 | 220 | ||
221 | `--level` is optional and could be `info`/`warn`/`error` | 221 | `--level` is optional and could be `info`/`warn`/`error` |
@@ -223,13 +223,13 @@ $ docker-compose exec -u peertube peertube npm run parse-log -- --level info | |||
223 | You can also remove SQL or HTTP logs using `--not-tags` (PeerTube >= 3.2): | 223 | You can also remove SQL or HTTP logs using `--not-tags` (PeerTube >= 3.2): |
224 | 224 | ||
225 | ```bash | 225 | ```bash |
226 | $ # Basic installation | 226 | # Basic installation |
227 | $ cd /var/www/peertube/peertube-latest | 227 | cd /var/www/peertube/peertube-latest |
228 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level debug --not-tags http sql | 228 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run parse-log -- --level debug --not-tags http sql |
229 | 229 | ||
230 | $ # Docker installation | 230 | # Docker installation |
231 | $ cd /var/www/peertube-docker | 231 | cd /var/www/peertube-docker |
232 | $ docker-compose exec -u peertube peertube npm run parse-log -- --level debug --not-tags http sql | 232 | docker-compose exec -u peertube peertube npm run parse-log -- --level debug --not-tags http sql |
233 | ``` | 233 | ``` |
234 | 234 | ||
235 | ### regenerate-thumbnails.js | 235 | ### regenerate-thumbnails.js |
@@ -239,13 +239,13 @@ $ docker-compose exec -u peertube peertube npm run parse-log -- --level debug -- | |||
239 | Regenerating local video thumbnails could be useful because new PeerTube releases may increase thumbnail sizes: | 239 | Regenerating local video thumbnails could be useful because new PeerTube releases may increase thumbnail sizes: |
240 | 240 | ||
241 | ```bash | 241 | ```bash |
242 | $ # Basic installation | 242 | # Basic installation |
243 | $ cd /var/www/peertube/peertube-latest | 243 | cd /var/www/peertube/peertube-latest |
244 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run regenerate-thumbnails | 244 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run regenerate-thumbnails |
245 | 245 | ||
246 | $ # Docker installation | 246 | # Docker installation |
247 | $ cd /var/www/peertube-docker | 247 | cd /var/www/peertube-docker |
248 | $ docker-compose exec -u peertube peertube npm run regenerate-thumbnails | 248 | docker-compose exec -u peertube peertube npm run regenerate-thumbnails |
249 | ``` | 249 | ``` |
250 | 250 | ||
251 | ### create-transcoding-job.js | 251 | ### create-transcoding-job.js |
@@ -255,25 +255,25 @@ You can use this script to force transcoding of an existing video. PeerTube need | |||
255 | To generate transcoding jobs depending on the instance configuration: | 255 | To generate transcoding jobs depending on the instance configuration: |
256 | 256 | ||
257 | ```bash | 257 | ```bash |
258 | $ # Basic installation | 258 | # Basic installation |
259 | $ cd /var/www/peertube/peertube-latest | 259 | cd /var/www/peertube/peertube-latest |
260 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] | 260 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] |
261 | 261 | ||
262 | $ # Docker installation | 262 | # Docker installation |
263 | $ cd /var/www/peertube-docker | 263 | cd /var/www/peertube-docker |
264 | $ docker-compose exec -u peertube peertube npm run create-transcoding-job -- -v [videoUUID] | 264 | docker-compose exec -u peertube peertube npm run create-transcoding-job -- -v [videoUUID] |
265 | ``` | 265 | ``` |
266 | 266 | ||
267 | Or to transcode to a specific resolution: | 267 | Or to transcode to a specific resolution: |
268 | 268 | ||
269 | ```bash | 269 | ```bash |
270 | $ # Basic installation | 270 | # Basic installation |
271 | $ cd /var/www/peertube/peertube-latest | 271 | cd /var/www/peertube/peertube-latest |
272 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution] | 272 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- -v [videoUUID] -r [resolution] |
273 | 273 | ||
274 | $ # Docker installation | 274 | # Docker installation |
275 | $ cd /var/www/peertube-docker | 275 | cd /var/www/peertube-docker |
276 | $ docker-compose exec -u peertube peertube npm run create-transcoding-job -- -v [videoUUID] -r [resolution] | 276 | docker-compose exec -u peertube peertube npm run create-transcoding-job -- -v [videoUUID] -r [resolution] |
277 | ``` | 277 | ``` |
278 | 278 | ||
279 | The resolution should be an integer (`1080`, `720`, `480`, etc.) | 279 | The resolution should be an integer (`1080`, `720`, `480`, etc.) |
@@ -281,13 +281,13 @@ The resolution should be an integer (`1080`, `720`, `480`, etc.) | |||
281 | To generate an HLS playlist for a video: | 281 | To generate an HLS playlist for a video: |
282 | 282 | ||
283 | ```bash | 283 | ```bash |
284 | $ # Basic installation | 284 | # Basic installation |
285 | $ cd /var/www/peertube/peertube-latest | 285 | cd /var/www/peertube/peertube-latest |
286 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID] | 286 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-transcoding-job -- --generate-hls -v [videoUUID] |
287 | 287 | ||
288 | $ # Docker installation | 288 | # Docker installation |
289 | $ cd /var/www/peertube-docker | 289 | cd /var/www/peertube-docker |
290 | $ docker-compose exec -u peertube peertube npm run create-transcoding-job -- --generate-hls -v [videoUUID] | 290 | docker-compose exec -u peertube peertube npm run create-transcoding-job -- --generate-hls -v [videoUUID] |
291 | ``` | 291 | ``` |
292 | 292 | ||
293 | ### create-import-video-file-job.js | 293 | ### create-import-video-file-job.js |
@@ -296,13 +296,13 @@ You can use this script to import a video file to replace an already uploaded fi | |||
296 | You can then create a transcoding job using `npm run create-transcoding-job` if you need to optimize your file or create an HLS version of it. | 296 | You can then create a transcoding job using `npm run create-transcoding-job` if you need to optimize your file or create an HLS version of it. |
297 | 297 | ||
298 | ```bash | 298 | ```bash |
299 | $ # Basic installation | 299 | # Basic installation |
300 | $ cd /var/www/peertube/peertube-latest | 300 | cd /var/www/peertube/peertube-latest |
301 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] | 301 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] |
302 | 302 | ||
303 | $ # Docker installation | 303 | # Docker installation |
304 | $ cd /var/www/peertube-docker | 304 | cd /var/www/peertube-docker |
305 | $ docker-compose exec -u peertube peertube npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] | 305 | docker-compose exec -u peertube peertube npm run create-import-video-file-job -- -v [videoUUID] -i [videoFile] |
306 | ``` | 306 | ``` |
307 | 307 | ||
308 | ### create-move-video-storage-job.js | 308 | ### create-move-video-storage-job.js |
@@ -312,25 +312,25 @@ $ docker-compose exec -u peertube peertube npm run create-import-video-file-job | |||
312 | Use this script to move all video files or a specific video file to object storage. | 312 | Use this script to move all video files or a specific video file to object storage. |
313 | 313 | ||
314 | ```bash | 314 | ```bash |
315 | $ # Basic installation | 315 | # Basic installation |
316 | $ cd /var/www/peertube/peertube-latest | 316 | cd /var/www/peertube/peertube-latest |
317 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] | 317 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] |
318 | 318 | ||
319 | $ # Docker installation | 319 | # Docker installation |
320 | $ cd /var/www/peertube-docker | 320 | cd /var/www/peertube-docker |
321 | $ docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] | 321 | docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage -v [videoUUID] |
322 | ``` | 322 | ``` |
323 | 323 | ||
324 | The script can also move all video files that are not already in object storage: | 324 | The script can also move all video files that are not already in object storage: |
325 | 325 | ||
326 | ```bash | 326 | ```bash |
327 | $ # Basic installation | 327 | # Basic installation |
328 | $ cd /var/www/peertube/peertube-latest | 328 | cd /var/www/peertube/peertube-latest |
329 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage --all-videos | 329 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run create-move-video-storage-job -- --to-object-storage --all-videos |
330 | 330 | ||
331 | $ # Docker installation | 331 | # Docker installation |
332 | $ cd /var/www/peertube-docker | 332 | cd /var/www/peertube-docker |
333 | $ docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage --all-videos | 333 | docker-compose exec -u peertube peertube npm run create-move-video-storage-job -- --to-object-storage --all-videos |
334 | ``` | 334 | ``` |
335 | 335 | ||
336 | 336 | ||
@@ -340,8 +340,8 @@ Some transcoded videos or shutdown at a bad time can leave some unused files on | |||
340 | Stop PeerTube and delete these files (a confirmation will be demanded first): | 340 | Stop PeerTube and delete these files (a confirmation will be demanded first): |
341 | 341 | ||
342 | ```bash | 342 | ```bash |
343 | $ cd /var/www/peertube/peertube-latest | 343 | cd /var/www/peertube/peertube-latest |
344 | $ sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage | 344 | sudo systemctl stop peertube && sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run prune-storage |
345 | ``` | 345 | ``` |
346 | 346 | ||
347 | 347 | ||
@@ -353,13 +353,13 @@ invalid torrent files and invalid URLs in your database. To fix this, you have | |||
353 | to run the command below (keep in mind your follower instances will NOT update their URLs). | 353 | to run the command below (keep in mind your follower instances will NOT update their URLs). |
354 | 354 | ||
355 | ```bash | 355 | ```bash |
356 | $ # Basic installation | 356 | # Basic installation |
357 | $ cd /var/www/peertube/peertube-latest | 357 | cd /var/www/peertube/peertube-latest |
358 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host | 358 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run update-host |
359 | 359 | ||
360 | $ # Docker installation | 360 | # Docker installation |
361 | $ cd /var/www/peertube-docker | 361 | cd /var/www/peertube-docker |
362 | $ docker-compose exec -u peertube peertube npm run update-host | 362 | docker-compose exec -u peertube peertube npm run update-host |
363 | ``` | 363 | ``` |
364 | 364 | ||
365 | ### reset-password.js | 365 | ### reset-password.js |
@@ -367,13 +367,13 @@ $ docker-compose exec -u peertube peertube npm run update-host | |||
367 | To reset a user password from CLI, run: | 367 | To reset a user password from CLI, run: |
368 | 368 | ||
369 | ```bash | 369 | ```bash |
370 | $ # Basic installation | 370 | # Basic installation |
371 | $ cd /var/www/peertube/peertube-latest | 371 | cd /var/www/peertube/peertube-latest |
372 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username | 372 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u target_username |
373 | 373 | ||
374 | $ # Docker installation | 374 | # Docker installation |
375 | $ cd /var/www/peertube-docker | 375 | cd /var/www/peertube-docker |
376 | $ docker-compose exec -u peertube peertube npm run reset-password -- -u target_username | 376 | docker-compose exec -u peertube peertube npm run reset-password -- -u target_username |
377 | ``` | 377 | ``` |
378 | 378 | ||
379 | 379 | ||
@@ -385,32 +385,32 @@ If PeerTube is running, you need to restart it for the changes to take effect (w | |||
385 | To install/update a plugin or a theme from the disk: | 385 | To install/update a plugin or a theme from the disk: |
386 | 386 | ||
387 | ```bash | 387 | ```bash |
388 | $ cd /var/www/peertube/peertube-latest | 388 | cd /var/www/peertube/peertube-latest |
389 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path | 389 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --plugin-path /local/plugin/path |
390 | 390 | ||
391 | $ # Docker installation | 391 | # Docker installation |
392 | $ cd /var/www/peertube-docker | 392 | cd /var/www/peertube-docker |
393 | $ docker-compose exec -u peertube peertube npm run plugin:install -- --plugin-path /local/plugin/path | 393 | docker-compose exec -u peertube peertube npm run plugin:install -- --plugin-path /local/plugin/path |
394 | ``` | 394 | ``` |
395 | 395 | ||
396 | From NPM: | 396 | From NPM: |
397 | 397 | ||
398 | ```bash | 398 | ```bash |
399 | $ cd /var/www/peertube/peertube-latest | 399 | cd /var/www/peertube/peertube-latest |
400 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin | 400 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:install -- --npm-name peertube-plugin-myplugin |
401 | 401 | ||
402 | $ # Docker installation | 402 | # Docker installation |
403 | $ cd /var/www/peertube-docker | 403 | cd /var/www/peertube-docker |
404 | $ docker-compose exec -u peertube peertube npm run plugin:install -- --npm-name peertube-plugin-myplugin | 404 | docker-compose exec -u peertube peertube npm run plugin:install -- --npm-name peertube-plugin-myplugin |
405 | ``` | 405 | ``` |
406 | 406 | ||
407 | To uninstall a plugin or a theme: | 407 | To uninstall a plugin or a theme: |
408 | 408 | ||
409 | ```bash | 409 | ```bash |
410 | $ cd /var/www/peertube/peertube-latest | 410 | cd /var/www/peertube/peertube-latest |
411 | $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin | 411 | sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin |
412 | 412 | ||
413 | $ # Docker installation | 413 | # Docker installation |
414 | $ cd /var/www/peertube-docker | 414 | cd /var/www/peertube-docker |
415 | $ docker-compose exec -u peertube peertube npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin | 415 | docker-compose exec -u peertube peertube npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin |
416 | ``` | 416 | ``` |