aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
authorLecygneNoir <victor.jlc@laposte.net>2018-02-19 09:42:43 +0100
committerChocobozzz <me@florianbigard.com>2018-02-19 09:42:43 +0100
commit2519d9fec6f84906d1b10770be791ad367186ca7 (patch)
tree935b88ac0c71b60b207797452a1c326cb84c14e4 /support/doc
parentd5b53822ae7e1660cebe3a35be5ce76ea73dc1b9 (diff)
downloadPeerTube-2519d9fec6f84906d1b10770be791ad367186ca7.tar.gz
PeerTube-2519d9fec6f84906d1b10770be791ad367186ca7.tar.zst
PeerTube-2519d9fec6f84906d1b10770be791ad367186ca7.zip
add import-youtube guide inside documentation (#298)
* add import-youtube guide inside documentation * safer to use unlink instead of rm to delete symbolic link, avoid risk of deleting entire directories in case of syntax error * spelling mistake corrections * anonymise URLs * git also needed as dependencies to run yarn install
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/dependencies.md4
-rw-r--r--support/doc/import-youtube.md57
-rw-r--r--support/doc/production.md4
3 files changed, 61 insertions, 4 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 4ced42b8b..a4a30374c 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -10,7 +10,7 @@
10 10
11``` 11```
12$ sudo apt update 12$ sudo apt update
13$ sudo apt install nginx ffmpeg postgresql openssl g++ make redis-server 13$ sudo apt install nginx ffmpeg postgresql openssl g++ make redis-server git
14``` 14```
15 15
16## Arch Linux 16## Arch Linux
@@ -36,7 +36,7 @@ $ sudo pacman -S nodejs yarn ffmpeg postgresql openssl redis
36$ sudo yum update 36$ sudo yum update
37$ sudo yum install epel-release 37$ sudo yum install epel-release
38$ sudo yum update 38$ sudo yum update
39$ sudo yum install nginx postgresql postgresql-server openssl gcc make redis 39$ sudo yum install nginx postgresql postgresql-server openssl gcc make redis git
40``` 40```
41 41
42## Other distributions 42## Other distributions
diff --git a/support/doc/import-youtube.md b/support/doc/import-youtube.md
new file mode 100644
index 000000000..3b8b515a7
--- /dev/null
+++ b/support/doc/import-youtube.md
@@ -0,0 +1,57 @@
1# Import videos from Youtube guide
2
3You can use this script to import videos from Youtube channel to Peertube.
4Be sure you own the videos or have the author's authorization to do so.
5
6 - [Installation](#installation)
7 - [Usage](#usage)
8
9## Installation
10
11## Prerequisites
12
13You need at least 512MB RAM to run the script.
14Importation can be launched directly from a peertube server (in this case you already have dependencies installed :+1:) or from a separate server, even a dekstop PC.
15
16### Dependencies
17
18If you do not run the script from a Peertube server, you need to follow the steps of the [dependencies guide](dependencies.md).
19
20### Installation
21
22Clone the Peertube repo to get the latest version inside your server:
23
24```
25git clone https://github.com/Chocobozzz/PeerTube.git
26CLONE="$(pwd)/Peertube"
27```
28
29Run ``yarn install``
30```
31cd ${CLONE}
32yarn install
33```
34
35Build server tools:
36```
37cd ${CLONE}
38npm run build:server
39```
40
41
42## Usage
43
44You are now ready to run the script :
45
46```
47cd ${CLONE}
48node dist/server/tools/import-youtube.js -u "PEERTUBE_URL" -U "PEERTUBE_USER" --password "PEERTUBE_PASSWORD" -y "YOUTUBE_URL"
49```
50
51 - PEERTUBE_URL : the full URL of your peertube server where you want to import, eg: https://peertube.cpy.re/
52 - PEERTUBE_USER : your peertube account where videos will be uploaded
53 - PEERTUBE_PASSWORD : password of your peertube account
54 - YOUTUBE_URL : the youtube channel you want to import. Supports Youtube channel (eg https://www.youtube.com/channel/ChannelId) or Youtube user (eg: https://www.youtube.com/c/UserName or https://www.youtube.com/user/UserName)
55
56 The script will get all public videos from Youtube, download them, then upload to Peertube.
57 Already downloaded videos will not be uploaded twice, so you can run and re-run the script in case of crash, disconnection, ... without problem. \ No newline at end of file
diff --git a/support/doc/production.md b/support/doc/production.md
index fc2bd460a..6d6cd68f8 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -202,7 +202,7 @@ Change the link to point to the latest version:
202 202
203``` 203```
204$ cd /var/www/peertube && \ 204$ cd /var/www/peertube && \
205 sudo rm ./peertube-latest && \ 205 sudo unlink ./peertube-latest && \
206 sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest 206 sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
207``` 207```
208 208
@@ -218,7 +218,7 @@ Change `peertube-latest` destination to the previous version and restore your SQ
218 218
219``` 219```
220$ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \ 220$ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19T10:18+01:00.bak" && \
221 cd /var/www/peertube && rm ./peertube-latest && \ 221 cd /var/www/peertube && unlink ./peertube-latest && \
222 sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \ 222 sudo -u peertube ln -s "versions/peertube-$OLD_VERSION" peertube-latest && \
223 pg_restore -U peertube -W -h localhost -c -d peertube_prod "$SQL_BACKUP_PATH" 223 pg_restore -U peertube -W -h localhost -c -d peertube_prod "$SQL_BACKUP_PATH"
224 sudo systemctl restart peertube 224 sudo systemctl restart peertube