diff options
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | config/default.yaml | 16 | ||||
-rw-r--r-- | config/production.yaml.example | 16 | ||||
-rwxr-xr-x | scripts/release.sh | 7 | ||||
-rw-r--r-- | server/helpers/requests.ts | 7 | ||||
-rw-r--r-- | support/doc/production.md | 6 |
6 files changed, 33 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore index fa7974ae4..13f31db4b 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -5,15 +5,7 @@ | |||
5 | /test4/ | 5 | /test4/ |
6 | /test5/ | 6 | /test5/ |
7 | /test6/ | 7 | /test6/ |
8 | /uploads/ | 8 | /storage/ |
9 | /videos/ | ||
10 | /avatars/ | ||
11 | /thumbnails/ | ||
12 | /previews/ | ||
13 | /certs/ | ||
14 | /logs/ | ||
15 | /torrents/ | ||
16 | /cache/ | ||
17 | /config/production.yaml | 9 | /config/production.yaml |
18 | /ffmpeg/ | 10 | /ffmpeg/ |
19 | /*.sublime-project | 11 | /*.sublime-project |
diff --git a/config/default.yaml b/config/default.yaml index 2c1043067..ee7446826 100644 --- a/config/default.yaml +++ b/config/default.yaml | |||
@@ -16,14 +16,14 @@ database: | |||
16 | 16 | ||
17 | # From the project root directory | 17 | # From the project root directory |
18 | storage: | 18 | storage: |
19 | avatars: 'avatars/' | 19 | avatars: 'storage/avatars/' |
20 | certs: 'certs/' | 20 | certs: 'storage/certs/' |
21 | videos: 'videos/' | 21 | videos: 'storage/videos/' |
22 | logs: 'logs/' | 22 | logs: 'storage/logs/' |
23 | previews: 'previews/' | 23 | previews: 'storage/previews/' |
24 | thumbnails: 'thumbnails/' | 24 | thumbnails: 'storage/thumbnails/' |
25 | torrents: 'torrents/' | 25 | torrents: 'storage/torrents/' |
26 | cache: 'cache/' | 26 | cache: 'storage/cache/' |
27 | 27 | ||
28 | cache: | 28 | cache: |
29 | previews: | 29 | previews: |
diff --git a/config/production.yaml.example b/config/production.yaml.example index 404d35c16..660477196 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example | |||
@@ -17,14 +17,14 @@ database: | |||
17 | 17 | ||
18 | # From the project root directory | 18 | # From the project root directory |
19 | storage: | 19 | storage: |
20 | avatars: 'avatars/' | 20 | avatars: '../storage/avatars/' |
21 | certs: 'certs/' | 21 | certs: '../storage/certs/' |
22 | videos: 'videos/' | 22 | videos: '../storage/videos/' |
23 | logs: 'logs/' | 23 | logs: '../storage/logs/' |
24 | previews: 'previews/' | 24 | previews: '../storage/previews/' |
25 | thumbnails: 'thumbnails/' | 25 | thumbnails: '../storage/thumbnails/' |
26 | torrents: 'torrents/' | 26 | torrents: '../storage/torrents/' |
27 | cache: 'cache/' | 27 | cache: '../storage/cache/' |
28 | 28 | ||
29 | cache: | 29 | cache: |
30 | previews: | 30 | previews: |
diff --git a/scripts/release.sh b/scripts/release.sh index 572e6bdca..1c23c228c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -1,5 +1,12 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | if [ -z "$1" ]; then | ||
4 | echo "Need version as argument" | ||
5 | exti -1 | ||
6 | fi | ||
7 | |||
8 | npm version $1 | ||
9 | |||
3 | npm run build | 10 | npm run build |
4 | npm test | 11 | npm test |
5 | 12 | ||
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index e8d77b15b..eb8a12868 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import * as Promise from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import { createWriteStream } from 'fs' | 2 | import { createWriteStream } from 'fs' |
3 | import * as request from 'request' | 3 | import * as request from 'request' |
4 | import { ACTIVITY_PUB } from '../initializers' | 4 | import { ACTIVITY_PUB } from '../initializers' |
5 | import Bluebird = require('bluebird') | ||
6 | 5 | ||
7 | function doRequest ( | 6 | function doRequest ( |
8 | requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean } | 7 | requestOptions: request.CoreOptions & request.UriOptions & { activityPub?: boolean } |
@@ -12,13 +11,13 @@ function doRequest ( | |||
12 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER | 11 | requestOptions.headers['accept'] = ACTIVITY_PUB.ACCEPT_HEADER |
13 | } | 12 | } |
14 | 13 | ||
15 | return new Promise<{ response: request.RequestResponse, body: any }>((res, rej) => { | 14 | return new Bluebird<{ response: request.RequestResponse, body: any }>((res, rej) => { |
16 | request(requestOptions, (err, response, body) => err ? rej(err) : res({ response, body })) | 15 | request(requestOptions, (err, response, body) => err ? rej(err) : res({ response, body })) |
17 | }) | 16 | }) |
18 | } | 17 | } |
19 | 18 | ||
20 | function doRequestAndSaveToFile (requestOptions: request.CoreOptions & request.UriOptions, destPath: string) { | 19 | function doRequestAndSaveToFile (requestOptions: request.CoreOptions & request.UriOptions, destPath: string) { |
21 | return new Promise<request.RequestResponse>((res, rej) => { | 20 | return new Bluebird<request.RequestResponse>((res, rej) => { |
22 | request(requestOptions) | 21 | request(requestOptions) |
23 | .on('response', response => res(response as request.RequestResponse)) | 22 | .on('response', response => res(response as request.RequestResponse)) |
24 | .on('error', err => rej(err)) | 23 | .on('error', err => rej(err)) |
diff --git a/support/doc/production.md b/support/doc/production.md index 118704da3..a8ed2af88 100644 --- a/support/doc/production.md +++ b/support/doc/production.md | |||
@@ -199,6 +199,12 @@ Tell systemd to reload its config: | |||
199 | sudo systemctl daemon-reload | 199 | sudo systemctl daemon-reload |
200 | ``` | 200 | ``` |
201 | 201 | ||
202 | If you want to start PeerTube on boot: | ||
203 | |||
204 | ``` | ||
205 | sudo systemctl enabled peertube | ||
206 | ``` | ||
207 | |||
202 | ### Run | 208 | ### Run |
203 | 209 | ||
204 | ``` | 210 | ``` |