aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/production.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/production.md')
-rw-r--r--support/doc/production.md24
1 files changed, 18 insertions, 6 deletions
diff --git a/support/doc/production.md b/support/doc/production.md
index 49569dad4..ee8bf2647 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -12,12 +12,16 @@ Create a `peertube` user with `/home/peertube` home:
12 12
13``` 13```
14$ sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube 14$ sudo useradd -m -d /home/peertube -s /bin/bash -p peertube peertube
15```
16
17Set its password:
18```
15$ sudo passwd peertube 19$ sudo passwd peertube
16``` 20```
17 21
18### Database 22### Database
19 23
20Create production database and peertube user: 24Create the production database and a peertube user inside PostgreSQL:
21 25
22``` 26```
23$ sudo -u postgres createuser -P peertube 27$ sudo -u postgres createuser -P peertube
@@ -26,13 +30,21 @@ $ sudo -u postgres createdb -O peertube peertube_prod
26 30
27### Prepare PeerTube directory 31### Prepare PeerTube directory
28 32
33Fetch the latest tagged version of Peertube
34```
35$ 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"
36```
37Open the peertube directory, create a few required directories
38```
39 cd /home/peertube && sudo -u peertube mkdir config storage versions && cd versions
40```
41Download the latest version of the Peertube client, unzip it and remove the zip
29``` 42```
30$ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && \
31 cd /home/peertube && \
32 sudo -u peertube mkdir config storage versions && \
33 cd versions && \
34 sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ 43 sudo -u peertube wget -q "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \
35 sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip && \ 44 sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip
45```
46Install Peertube
47```
36 cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest && \ 48 cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest && \
37 cd ./peertube-latest && sudo -u peertube yarn install --production --pure-lockfile 49 cd ./peertube-latest && sudo -u peertube yarn install --production --pure-lockfile
38``` 50```