aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-12 18:55:45 +0100
committerChocobozzz <me@florianbigard.com>2018-01-12 18:55:45 +0100
commitafe817679974cec47f5bea1699cee3fe58cd5ada (patch)
tree1134780b1dc24191d0f8a66e3ff8f206e1ca2d36 /support/doc
parent63bfad7ec984dad1e9a96de1f191db5cc78db5bf (diff)
downloadPeerTube-afe817679974cec47f5bea1699cee3fe58cd5ada.tar.gz
PeerTube-afe817679974cec47f5bea1699cee3fe58cd5ada.tar.zst
PeerTube-afe817679974cec47f5bea1699cee3fe58cd5ada.zip
Some markdown fixes
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/dependencies.md14
-rw-r--r--support/doc/development/client/code.md4
-rw-r--r--support/doc/development/server/code.md12
-rw-r--r--support/doc/production.md26
4 files changed, 27 insertions, 29 deletions
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index d77724b5a..2f2d4f49d 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -1,8 +1,6 @@
1# Installation 1# Dependencies
2 2
3## Dependencies 3## Debian / Ubuntu
4
5### Debian / Ubuntu
6 4
7 1. Install NodeJS 8.x (current LTS): 5 1. Install NodeJS 8.x (current LTS):
8 [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) 6 [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
@@ -10,20 +8,20 @@
10 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) 8 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
11 4. Run: 9 4. Run:
12 10
13```bash 11```
14$ apt-get update 12$ apt-get update
15$ apt-get install nginx ffmpeg postgresql openssl g++ make 13$ apt-get install nginx ffmpeg postgresql openssl g++ make
16``` 14```
17 15
18### Arch Linux 16## Arch Linux
19 17
20 1. Run: 18 1. Run:
21 19
22```bash 20```
23$ pacman -S nodejs yarn ffmpeg postgresql openssl 21$ pacman -S nodejs yarn ffmpeg postgresql openssl
24``` 22```
25 23
26### Other distributions 24## Other distributions
27 25
28Feel free to update this file in a pull request! 26Feel free to update this file in a pull request!
29 27
diff --git a/support/doc/development/client/code.md b/support/doc/development/client/code.md
index 749783c29..f84c7b998 100644
--- a/support/doc/development/client/code.md
+++ b/support/doc/development/client/code.md
@@ -17,7 +17,7 @@ The client is a HTML/CSS/JavaScript web application (single page application ->
17## Files 17## Files
18 18
19The client files are in the `client` directory. The Webpack 2 configurations files are in `client/config` and the source files in `client/src`. 19The client files are in the `client` directory. The Webpack 2 configurations files are in `client/config` and the source files in `client/src`.
20The client modules description are in the [client/package.json](https://github.com/Chocobozzz/PeerTube/blob/master/client/package.json). There are many modules that are used to compile the web application in development or production mode. 20The client modules description are in the [client/package.json](/client/package.json). There are many modules that are used to compile the web application in development or production mode.
21Here is the description of the useful `client` files directory: 21Here is the description of the useful `client` files directory:
22 22
23 tslint.json -> TypeScript linter rules 23 tslint.json -> TypeScript linter rules
@@ -60,7 +60,7 @@ If you are not familiar with Angular I recommend you to read the [quickstart gui
60 60
61## Components tree 61## Components tree
62 62
63![Components tree](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/client/components-tree.png) 63![Components tree](/support/doc/client/development/components-tree.png)
64 64
65## Newcomers 65## Newcomers
66 66
diff --git a/support/doc/development/server/code.md b/support/doc/development/server/code.md
index ddb93119b..a8793e807 100644
--- a/support/doc/development/server/code.md
+++ b/support/doc/development/server/code.md
@@ -15,9 +15,9 @@ The server is a web server developed with [TypeScript](https://www.typescriptlan
15 15
16## Files 16## Files
17 17
18The server main file is [server.ts](https://github.com/Chocobozzz/PeerTube/blob/master/server.ts). 18The server main file is [server.ts](/server.ts).
19The server modules description are in the [package.json](https://github.com/Chocobozzz/PeerTube/blob/master/package.json) at the project root. 19The server modules description are in the [package.json](/package.json) at the project root.
20All other server files are in the [server](https://github.com/Chocobozzz/PeerTube/tree/master/server) directory: 20All other server files are in the [server](/server) directory:
21 21
22 server.ts -> app initilization, main routes configuration (static routes...) 22 server.ts -> app initilization, main routes configuration (static routes...)
23 config -> server YAML configurations (for tests, production...) 23 config -> server YAML configurations (for tests, production...)
@@ -45,7 +45,7 @@ The server is composed by:
45 45
46A video is seeded by the server with the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP). 46A video is seeded by the server with the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP).
47 47
48![Architecture scheme](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/upload-video.png) 48![Architecture scheme](/support/doc/development/server/upload-video.png)
49 49
50When a user uploads a video, the rest API create the torrent file and then adds it to its database. 50When a user uploads a video, the rest API create the torrent file and then adds it to its database.
51 51
@@ -53,5 +53,5 @@ If a user wants to watch the video, the tracker will indicate all other users th
53 53
54## Newcomers 54## Newcomers
55 55
56The server entrypoint is [server.ts](https://github.com/Chocobozzz/PeerTube/blob/master/server.ts). You can begin to look at this file. 56The server entrypoint is [server.ts](/server.ts). You can begin to look at this file.
57Then you can try to understand the [controllers](https://github.com/Chocobozzz/PeerTube/tree/master/server/controllers): they are the entrypoint of each API request. 57Then you can try to understand the [controllers](/server/controllers): they are the entrypoint of each API request.
diff --git a/support/doc/production.md b/support/doc/production.md
index 4d7c14f2b..118704da3 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -10,7 +10,7 @@ Follow the steps of the [dependencies guide](dependencies.md).
10 10
11Create a `peertube` user with `/home/peertube` home: 11Create a `peertube` user with `/home/peertube` home:
12 12
13```bash 13```
14sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube 14sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube
15sudo passwd peertube 15sudo passwd peertube
16``` 16```
@@ -19,7 +19,7 @@ sudo passwd peertube
19 19
20Create production database and peertube user: 20Create production database and peertube user:
21 21
22```bash 22```
23sudo -u postgres createuser -P peertube 23sudo -u postgres createuser -P peertube
24sudo -u postgres createdb -O peertube peertube_prod 24sudo -u postgres createdb -O peertube peertube_prod
25``` 25```
@@ -28,7 +28,7 @@ sudo -u postgres createdb -O peertube peertube_prod
28 28
29Clone, install node dependencies and build application: 29Clone, install node dependencies and build application:
30 30
31```bash 31```
32$ cd /home/peertube 32$ cd /home/peertube
33$ sudo -u peertube git clone -b master https://github.com/Chocobozzz/PeerTube 33$ sudo -u peertube git clone -b master https://github.com/Chocobozzz/PeerTube
34$ cd PeerTube 34$ cd PeerTube
@@ -40,7 +40,7 @@ $ sudo -u peertube npm run build
40 40
41Copy example configuration: 41Copy example configuration:
42 42
43```bash 43```
44$ sudo -u peertube cp config/production.yaml.example config/production.yaml 44$ sudo -u peertube cp config/production.yaml.example config/production.yaml
45``` 45```
46 46
@@ -52,14 +52,14 @@ configuration. Keys set in this file will override those of
52 52
53Copy the nginx configuration template: 53Copy the nginx configuration template:
54 54
55```bash 55```
56$ sudo cp /home/peertube/PeerTube/support/nginx/peertube-https /etc/nginx/sites-available/peertube 56$ sudo cp /home/peertube/PeerTube/support/nginx/peertube-https /etc/nginx/sites-available/peertube
57``` 57```
58 58
59Then modify the webserver configuration file. Please pay attention to the `alias` key of `/static/webseed` location. 59Then modify the webserver configuration file. Please pay attention to the `alias` key of `/static/webseed` location.
60It should correspond to the path of your videos directory (set in the configuration file as `storage->videos` key). 60It should correspond to the path of your videos directory (set in the configuration file as `storage->videos` key).
61 61
62```bash 62```
63$ sudo vim /etc/nginx/sites-available/peertube 63$ sudo vim /etc/nginx/sites-available/peertube
64``` 64```
65 65
@@ -150,7 +150,7 @@ server {
150 150
151Activate the configuration file: 151Activate the configuration file:
152 152
153```bash 153```
154$ sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube 154$ sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
155$ sudo systemctl reload nginx 155$ sudo systemctl reload nginx
156``` 156```
@@ -159,13 +159,13 @@ $ sudo systemctl reload nginx
159 159
160Copy the nginx configuration template: 160Copy the nginx configuration template:
161 161
162```bash 162```
163sudo cp /home/peertube/PeerTube/support/systemd/peertube.service /etc/systemd/system/ 163sudo cp /home/peertube/PeerTube/support/systemd/peertube.service /etc/systemd/system/
164``` 164```
165 165
166Update the service file: 166Update the service file:
167 167
168```bash 168```
169sudo vim /etc/systemd/system/peertube.service 169sudo vim /etc/systemd/system/peertube.service
170``` 170```
171 171
@@ -195,13 +195,13 @@ WantedBy=multi-user.target
195 195
196Tell systemd to reload its config: 196Tell systemd to reload its config:
197 197
198```bash 198```
199sudo systemctl daemon-reload 199sudo systemctl daemon-reload
200``` 200```
201 201
202### Run 202### Run
203 203
204```bash 204```
205sudo systemctl start peertube 205sudo systemctl start peertube
206sudo journalctl -feu peertube 206sudo journalctl -feu peertube
207``` 207```
@@ -211,7 +211,7 @@ sudo journalctl -feu peertube
211The administrator password is automatically generated and can be found in the 211The administrator password is automatically generated and can be found in the
212logs. You can set another password with: 212logs. You can set another password with:
213 213
214```bash 214```
215$ NODE_ENV=production npm run reset-password -- -u root 215$ NODE_ENV=production npm run reset-password -- -u root
216``` 216```
217 217
@@ -220,7 +220,7 @@ $ NODE_ENV=production npm run reset-password -- -u root
220The following commands will upgrade the source (according to your current 220The following commands will upgrade the source (according to your current
221branch), upgrade node modules and rebuild client application: 221branch), upgrade node modules and rebuild client application:
222 222
223```bash 223```
224# systemctl stop peertube 224# systemctl stop peertube
225$ npm run upgrade-peertube 225$ npm run upgrade-peertube
226# systemctl start peertube 226# systemctl start peertube