Updated Debian Jessie production installation guide (markdown)
authorpitchum <pitchum@users.noreply.github.com>
Fri, 24 Nov 2017 16:46:43 +0000 (17:46 +0100)
committerpitchum <pitchum@users.noreply.github.com>
Fri, 24 Nov 2017 16:46:43 +0000 (17:46 +0100)
Debian-Jessie-production-installation-guide.md

index f260791102098818ca0bf32e40fd7edb13731626..f9223163ea812caf73fc209f3c0cf3139e616266 100644 (file)
@@ -15,7 +15,7 @@ We need to install dependencies:
 We need to create the database:
 
     sudo -u postgres createuser -P peertube
-    sudo -u postgres createdb -O peertube peertube
+    sudo -u postgres createdb -O peertube peertube_prod
 
 # User
 We need to create the peertube user:
@@ -70,6 +70,29 @@ Copy the service file:
 Update the service file:
 
     sudo vim /etc/systemd/system/peertube.service
+
+It should look like this:
+
+    [Unit]
+    Description=PeerTube daemon
+
+    [Service]
+    Type=simple
+    Environment=NODE_ENV=production
+    User=peertube
+    Group=peertube
+    ExecStart=/usr/bin/npm start
+    WorkingDirectory=/home/peertube/PeerTube/
+    StandardOutput=syslog
+    StandardError=syslog
+    SyslogIdentifier=peertube
+    Restart=always
+
+    [Install]
+    WantedBy=multi-user.target
+
+Then tell systemd to reload its config:
+
     sudo systemctl daemon-reload
 
 # Run PeerTube