Prepare production workflow
authorChocobozzz <me@florianbigard.com>
Mon, 15 Jan 2018 09:53:36 +0000 (10:53 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 15 Jan 2018 09:53:36 +0000 (10:53 +0100)
.gitignore
config/default.yaml
config/production.yaml.example
scripts/release.sh
server/helpers/requests.ts
support/doc/production.md

index fa7974ae428ccd88774d97c23f9266e234c29103..13f31db4ba039fb680823a9a83e3b06132901565 100644 (file)
@@ -5,15 +5,7 @@
 /test4/
 /test5/
 /test6/
-/uploads/
-/videos/
-/avatars/
-/thumbnails/
-/previews/
-/certs/
-/logs/
-/torrents/
-/cache/
+/storage/
 /config/production.yaml
 /ffmpeg/
 /*.sublime-project
index 2c1043067ce432bbb8d30283516d1faae7cda3b3..ee744682655828fd803ff35fb4dddff26f12d710 100644 (file)
@@ -16,14 +16,14 @@ database:
 
 # From the project root directory
 storage:
-  avatars: 'avatars/'
-  certs: 'certs/'
-  videos: 'videos/'
-  logs: 'logs/'
-  previews: 'previews/'
-  thumbnails: 'thumbnails/'
-  torrents: 'torrents/'
-  cache: 'cache/'
+  avatars: 'storage/avatars/'
+  certs: 'storage/certs/'
+  videos: 'storage/videos/'
+  logs: 'storage/logs/'
+  previews: 'storage/previews/'
+  thumbnails: 'storage/thumbnails/'
+  torrents: 'storage/torrents/'
+  cache: 'storage/cache/'
 
 cache:
   previews:
index 404d35c16f51e6424f883c9050f1a7568542564e..660477196c4c26d4b6b29fb801986b8e88038a86 100644 (file)
@@ -17,14 +17,14 @@ database:
 
 # From the project root directory
 storage:
-  avatars: 'avatars/'
-  certs: 'certs/'
-  videos: 'videos/'
-  logs: 'logs/'
-  previews: 'previews/'
-  thumbnails: 'thumbnails/'
-  torrents: 'torrents/'
-  cache: 'cache/'
+  avatars: '../storage/avatars/'
+  certs: '../storage/certs/'
+  videos: '../storage/videos/'
+  logs: '../storage/logs/'
+  previews: '../storage/previews/'
+  thumbnails: '../storage/thumbnails/'
+  torrents: '../storage/torrents/'
+  cache: '../storage/cache/'
 
 cache:
   previews:
index 572e6bdca86188974105df74746f7e7b939d909d..1c23c228c35be2c9f0438c640e4cc4b83820a641 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
 
+if [ -z "$1" ]; then
+  echo "Need version as argument"
+  exti -1
+fi
+
+npm version $1
+
 npm run build
 npm test
 
index e8d77b15b5789cfd74aff8b8254f99c903bd3d88..eb8a12868137802fec658275874ed9e488f74597 100644 (file)
@@ -1,8 +1,7 @@
-import * as Promise from 'bluebird'
+import * as Bluebird from 'bluebird'
 import { createWriteStream } from 'fs'
 import * as request from 'request'
 import { ACTIVITY_PUB } from '../initializers'
-import Bluebird = require('bluebird')
 
 function doRequest (
   requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean }
@@ -12,13 +11,13 @@ function doRequest (
     requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER
   }
 
-  return new Promise<{ response: request.RequestResponse, body: any }>((res, rej) => {
+  return new Bluebird<{ response: request.RequestResponse, body: any }>((res, rej) => {
     request(requestOptions, (err, response, body) => err ? rej(err) : res({ response, body }))
   })
 }
 
 function doRequestAndSaveToFile (requestOptions: request.CoreOptions & request.UriOptions, destPath: string) {
-  return new Promise<request.RequestResponse>((res, rej) => {
+  return new Bluebird<request.RequestResponse>((res, rej) => {
     request(requestOptions)
       .on('response', response => res(response as request.RequestResponse))
       .on('error', err => rej(err))
index 118704da3195a746f640e1d8892e8ef5a64262b7..a8ed2af883e01a35ffb50e85516299e9bf3afbca 100644 (file)
@@ -199,6 +199,12 @@ Tell systemd to reload its config:
 sudo systemctl daemon-reload
 ```
 
+If you want to start PeerTube on boot:
+
+```
+sudo systemctl enabled peertube
+```
+
 ### Run
 
 ```