mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-22 00:38:03 -06:00
Some markdown fixes
This commit is contained in:
parent
63bfad7ec9
commit
afe8176799
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@ -35,7 +35,7 @@ to install the dependencies.
|
||||
|
||||
Then clone the sources and install node modules:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ git clone -b master https://github.com/Chocobozzz/PeerTube
|
||||
$ cd PeerTube
|
||||
$ yarn install --pure-lockfile
|
||||
@ -46,7 +46,7 @@ Then, create a postgres database and user with the values set in the
|
||||
there, the following commands would create a new database called `peertube_dev`
|
||||
and a postgres user called `peertube` with password `peertube`:
|
||||
|
||||
```bash
|
||||
```
|
||||
# sudo -u postgres createuser -P peertube
|
||||
Enter password for new role: peertube
|
||||
# sudo -u postgres createdb -O peertube peertube_dev
|
||||
@ -60,7 +60,7 @@ You can find a documentation of the server code/architecture [here](/support/doc
|
||||
|
||||
To develop on the server-side:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ npm run dev:server
|
||||
```
|
||||
|
||||
@ -76,7 +76,7 @@ You can find a documentation of the server code/architecture
|
||||
|
||||
To develop on the client side:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ npm run dev:client
|
||||
```
|
||||
|
||||
@ -88,7 +88,7 @@ reload them automatically thanks to hot module replacement.
|
||||
|
||||
This will run 3 nodes:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ npm run clean:server:test
|
||||
$ npm run play
|
||||
```
|
||||
|
@ -143,13 +143,13 @@ See the [production guide](support/doc/production.md).
|
||||
## Contributing
|
||||
|
||||
See the [contributing
|
||||
guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md)
|
||||
guide](/.github/CONTRIBUTING.md)
|
||||
to see how to contribute to PeerTube. Spoiler alert: you don't need to be a
|
||||
coder to help!
|
||||
|
||||
## Architecture
|
||||
|
||||
See [ARCHITECTURE.md](https://github.com/Chocobozzz/PeerTube/blob/master/ARCHITECTURE.md) for a more detailed explanation.
|
||||
See [ARCHITECTURE.md](/ARCHITECTURE.md) for a more detailed explanation.
|
||||
|
||||
### Backend
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
# Installation
|
||||
# Dependencies
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Debian / Ubuntu
|
||||
## Debian / Ubuntu
|
||||
|
||||
1. Install NodeJS 8.x (current LTS):
|
||||
[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 @@
|
||||
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
|
||||
4. Run:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ apt-get update
|
||||
$ apt-get install nginx ffmpeg postgresql openssl g++ make
|
||||
```
|
||||
|
||||
### Arch Linux
|
||||
## Arch Linux
|
||||
|
||||
1. Run:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ pacman -S nodejs yarn ffmpeg postgresql openssl
|
||||
```
|
||||
|
||||
### Other distributions
|
||||
## Other distributions
|
||||
|
||||
Feel free to update this file in a pull request!
|
||||
|
||||
|
@ -17,7 +17,7 @@ The client is a HTML/CSS/JavaScript web application (single page application ->
|
||||
## Files
|
||||
|
||||
The client files are in the `client` directory. The Webpack 2 configurations files are in `client/config` and the source files in `client/src`.
|
||||
The 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.
|
||||
The 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.
|
||||
Here is the description of the useful `client` files directory:
|
||||
|
||||
tslint.json -> TypeScript linter rules
|
||||
@ -60,7 +60,7 @@ If you are not familiar with Angular I recommend you to read the [quickstart gui
|
||||
|
||||
## Components tree
|
||||
|
||||
![Components tree](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/client/components-tree.png)
|
||||
![Components tree](/support/doc/client/development/components-tree.png)
|
||||
|
||||
## Newcomers
|
||||
|
||||
|
@ -15,9 +15,9 @@ The server is a web server developed with [TypeScript](https://www.typescriptlan
|
||||
|
||||
## Files
|
||||
|
||||
The server main file is [server.ts](https://github.com/Chocobozzz/PeerTube/blob/master/server.ts).
|
||||
The server modules description are in the [package.json](https://github.com/Chocobozzz/PeerTube/blob/master/package.json) at the project root.
|
||||
All other server files are in the [server](https://github.com/Chocobozzz/PeerTube/tree/master/server) directory:
|
||||
The server main file is [server.ts](/server.ts).
|
||||
The server modules description are in the [package.json](/package.json) at the project root.
|
||||
All other server files are in the [server](/server) directory:
|
||||
|
||||
server.ts -> app initilization, main routes configuration (static routes...)
|
||||
config -> server YAML configurations (for tests, production...)
|
||||
@ -45,7 +45,7 @@ The server is composed by:
|
||||
|
||||
A video is seeded by the server with the [WebSeed](http://www.bittorrent.org/beps/bep_0019.html) protocol (HTTP).
|
||||
|
||||
![Architecture scheme](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/upload-video.png)
|
||||
![Architecture scheme](/support/doc/development/server/upload-video.png)
|
||||
|
||||
When a user uploads a video, the rest API create the torrent file and then adds it to its database.
|
||||
|
||||
@ -53,5 +53,5 @@ If a user wants to watch the video, the tracker will indicate all other users th
|
||||
|
||||
## Newcomers
|
||||
|
||||
The server entrypoint is [server.ts](https://github.com/Chocobozzz/PeerTube/blob/master/server.ts). You can begin to look at this file.
|
||||
Then you can try to understand the [controllers](https://github.com/Chocobozzz/PeerTube/tree/master/server/controllers): they are the entrypoint of each API request.
|
||||
The server entrypoint is [server.ts](/server.ts). You can begin to look at this file.
|
||||
Then you can try to understand the [controllers](/server/controllers): they are the entrypoint of each API request.
|
||||
|
@ -10,7 +10,7 @@ Follow the steps of the [dependencies guide](dependencies.md).
|
||||
|
||||
Create a `peertube` user with `/home/peertube` home:
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube
|
||||
sudo passwd peertube
|
||||
```
|
||||
@ -19,7 +19,7 @@ sudo passwd peertube
|
||||
|
||||
Create production database and peertube user:
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo -u postgres createuser -P peertube
|
||||
sudo -u postgres createdb -O peertube peertube_prod
|
||||
```
|
||||
@ -28,7 +28,7 @@ sudo -u postgres createdb -O peertube peertube_prod
|
||||
|
||||
Clone, install node dependencies and build application:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ cd /home/peertube
|
||||
$ sudo -u peertube git clone -b master https://github.com/Chocobozzz/PeerTube
|
||||
$ cd PeerTube
|
||||
@ -40,7 +40,7 @@ $ sudo -u peertube npm run build
|
||||
|
||||
Copy example configuration:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ sudo -u peertube cp config/production.yaml.example config/production.yaml
|
||||
```
|
||||
|
||||
@ -52,14 +52,14 @@ configuration. Keys set in this file will override those of
|
||||
|
||||
Copy the nginx configuration template:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ sudo cp /home/peertube/PeerTube/support/nginx/peertube-https /etc/nginx/sites-available/peertube
|
||||
```
|
||||
|
||||
Then modify the webserver configuration file. Please pay attention to the `alias` key of `/static/webseed` location.
|
||||
It should correspond to the path of your videos directory (set in the configuration file as `storage->videos` key).
|
||||
|
||||
```bash
|
||||
```
|
||||
$ sudo vim /etc/nginx/sites-available/peertube
|
||||
```
|
||||
|
||||
@ -150,7 +150,7 @@ server {
|
||||
|
||||
Activate the configuration file:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ sudo ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
|
||||
$ sudo systemctl reload nginx
|
||||
```
|
||||
@ -159,13 +159,13 @@ $ sudo systemctl reload nginx
|
||||
|
||||
Copy the nginx configuration template:
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo cp /home/peertube/PeerTube/support/systemd/peertube.service /etc/systemd/system/
|
||||
```
|
||||
|
||||
Update the service file:
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo vim /etc/systemd/system/peertube.service
|
||||
```
|
||||
|
||||
@ -195,13 +195,13 @@ WantedBy=multi-user.target
|
||||
|
||||
Tell systemd to reload its config:
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
```
|
||||
sudo systemctl start peertube
|
||||
sudo journalctl -feu peertube
|
||||
```
|
||||
@ -211,7 +211,7 @@ sudo journalctl -feu peertube
|
||||
The administrator password is automatically generated and can be found in the
|
||||
logs. You can set another password with:
|
||||
|
||||
```bash
|
||||
```
|
||||
$ NODE_ENV=production npm run reset-password -- -u root
|
||||
```
|
||||
|
||||
@ -220,7 +220,7 @@ $ NODE_ENV=production npm run reset-password -- -u root
|
||||
The following commands will upgrade the source (according to your current
|
||||
branch), upgrade node modules and rebuild client application:
|
||||
|
||||
```bash
|
||||
```
|
||||
# systemctl stop peertube
|
||||
$ npm run upgrade-peertube
|
||||
# systemctl start peertube
|
||||
|
Loading…
Reference in New Issue
Block a user