aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/default.yaml4
-rw-r--r--config/production.yaml.example2
-rw-r--r--config/test-1.yaml2
-rw-r--r--config/test-2.yaml2
-rw-r--r--config/test-3.yaml2
-rw-r--r--config/test-4.yaml2
-rw-r--r--config/test-5.yaml2
-rw-r--r--config/test-6.yaml2
-rw-r--r--config/test.yaml2
-rw-r--r--server/controllers/api/clients.js4
-rw-r--r--server/helpers/logger.js2
-rw-r--r--server/initializers/checker.js4
-rw-r--r--server/initializers/constants.js6
-rw-r--r--server/initializers/database.js2
-rw-r--r--server/lib/friends.js2
-rw-r--r--server/models/video.js2
16 files changed, 21 insertions, 21 deletions
diff --git a/config/default.yaml b/config/default.yaml
index 909bec177..ad27b4eb8 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -3,11 +3,11 @@ listen:
3 3
4webserver: 4webserver:
5 https: false 5 https: false
6 host: 'localhost' 6 hostname: 'localhost'
7 port: 9000 7 port: 9000
8 8
9database: 9database:
10 host: 'localhost' 10 hostname: 'localhost'
11 port: 27017 11 port: 27017
12 suffix: '-dev' 12 suffix: '-dev'
13 13
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 8bc63ee92..056ace434 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -1,7 +1,7 @@
1# Correspond to your reverse proxy "listen" configuration 1# Correspond to your reverse proxy "listen" configuration
2webserver: 2webserver:
3 https: false 3 https: false
4 host: 'example.com' 4 hostname: 'example.com'
5 port: 80 5 port: 80
6 6
7database: 7database:
diff --git a/config/test-1.yaml b/config/test-1.yaml
index 4be44abc7..6dcc7f294 100644
--- a/config/test-1.yaml
+++ b/config/test-1.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9001 2 port: 9001
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9001 6 port: 9001
7 7
8database: 8database:
diff --git a/config/test-2.yaml b/config/test-2.yaml
index c723e6863..209525963 100644
--- a/config/test-2.yaml
+++ b/config/test-2.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9002 2 port: 9002
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9002 6 port: 9002
7 7
8database: 8database:
diff --git a/config/test-3.yaml b/config/test-3.yaml
index 58417c34b..15719d107 100644
--- a/config/test-3.yaml
+++ b/config/test-3.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9003 2 port: 9003
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9003 6 port: 9003
7 7
8database: 8database:
diff --git a/config/test-4.yaml b/config/test-4.yaml
index 68253cae9..e6f34d013 100644
--- a/config/test-4.yaml
+++ b/config/test-4.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9004 2 port: 9004
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9004 6 port: 9004
7 7
8database: 8database:
diff --git a/config/test-5.yaml b/config/test-5.yaml
index aafd45889..fdeec76d4 100644
--- a/config/test-5.yaml
+++ b/config/test-5.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9005 2 port: 9005
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9005 6 port: 9005
7 7
8database: 8database:
diff --git a/config/test-6.yaml b/config/test-6.yaml
index ba83b0bc1..0c9630c89 100644
--- a/config/test-6.yaml
+++ b/config/test-6.yaml
@@ -2,7 +2,7 @@ listen:
2 port: 9006 2 port: 9006
3 3
4webserver: 4webserver:
5 host: 'localhost' 5 hostname: 'localhost'
6 port: 9006 6 port: 9006
7 7
8database: 8database:
diff --git a/config/test.yaml b/config/test.yaml
index 8a667a001..06705a987 100644
--- a/config/test.yaml
+++ b/config/test.yaml
@@ -5,5 +5,5 @@ webserver:
5 https: false 5 https: false
6 6
7database: 7database:
8 host: 'localhost' 8 hostname: 'localhost'
9 port: 27017 9 port: 27017
diff --git a/server/controllers/api/clients.js b/server/controllers/api/clients.js
index ce1149227..b01354195 100644
--- a/server/controllers/api/clients.js
+++ b/server/controllers/api/clients.js
@@ -13,9 +13,9 @@ router.get('/local', getLocalClient)
13 13
14// Get the client credentials for the PeerTube front end 14// Get the client credentials for the PeerTube front end
15function getLocalClient (req, res, next) { 15function getLocalClient (req, res, next) {
16 const serverHost = constants.CONFIG.WEBSERVER.HOST 16 const serverHostname = constants.CONFIG.WEBSERVER.HOSTNAME
17 const serverPort = constants.CONFIG.WEBSERVER.PORT 17 const serverPort = constants.CONFIG.WEBSERVER.PORT
18 let headerHostShouldBe = serverHost 18 let headerHostShouldBe = serverHostname
19 if (serverPort !== 80 && serverPort !== 443) { 19 if (serverPort !== 80 && serverPort !== 443) {
20 headerHostShouldBe += ':' + serverPort 20 headerHostShouldBe += ':' + serverPort
21 } 21 }
diff --git a/server/helpers/logger.js b/server/helpers/logger.js
index 590ceaeb6..fcc1789fd 100644
--- a/server/helpers/logger.js
+++ b/server/helpers/logger.js
@@ -8,7 +8,7 @@ winston.emitErrs = true
8 8
9const constants = require('../initializers/constants') 9const constants = require('../initializers/constants')
10 10
11const label = constants.CONFIG.WEBSERVER.HOST + ':' + constants.CONFIG.WEBSERVER.PORT 11const label = constants.CONFIG.WEBSERVER.HOSTNAME + ':' + constants.CONFIG.WEBSERVER.PORT
12 12
13// Create the directory if it does not exist 13// Create the directory if it does not exist
14mkdirp.sync(constants.CONFIG.STORAGE.LOG_DIR) 14mkdirp.sync(constants.CONFIG.STORAGE.LOG_DIR)
diff --git a/server/initializers/checker.js b/server/initializers/checker.js
index 0bc5df92f..4ecabac77 100644
--- a/server/initializers/checker.js
+++ b/server/initializers/checker.js
@@ -15,8 +15,8 @@ const checker = {
15// Check the config files 15// Check the config files
16function checkConfig () { 16function checkConfig () {
17 const required = [ 'listen.port', 17 const required = [ 'listen.port',
18 'webserver.https', 'webserver.host', 'webserver.port', 18 'webserver.https', 'webserver.hostname', 'webserver.port',
19 'database.host', 'database.port', 'database.suffix', 19 'database.hostname', 'database.port', 'database.suffix',
20 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails' 20 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails'
21 ] 21 ]
22 const miss = [] 22 const miss = []
diff --git a/server/initializers/constants.js b/server/initializers/constants.js
index 8a8d5c1ce..5ccd42773 100644
--- a/server/initializers/constants.js
+++ b/server/initializers/constants.js
@@ -32,7 +32,7 @@ const OAUTH_LIFETIME = {
32const CONFIG = { 32const CONFIG = {
33 DATABASE: { 33 DATABASE: {
34 DBNAME: 'peertube' + config.get('database.suffix'), 34 DBNAME: 'peertube' + config.get('database.suffix'),
35 HOST: config.get('database.host'), 35 HOSTNAME: config.get('database.hostname'),
36 PORT: config.get('database.port') 36 PORT: config.get('database.port')
37 }, 37 },
38 STORAGE: { 38 STORAGE: {
@@ -45,11 +45,11 @@ const CONFIG = {
45 WEBSERVER: { 45 WEBSERVER: {
46 SCHEME: config.get('webserver.https') === true ? 'https' : 'http', 46 SCHEME: config.get('webserver.https') === true ? 'https' : 'http',
47 WS: config.get('webserver.https') === true ? 'wss' : 'ws', 47 WS: config.get('webserver.https') === true ? 'wss' : 'ws',
48 HOST: config.get('webserver.host'), 48 HOSTNAME: config.get('webserver.hostname'),
49 PORT: config.get('webserver.port') 49 PORT: config.get('webserver.port')
50 } 50 }
51} 51}
52CONFIG.WEBSERVER.URL = CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOST + ':' + CONFIG.WEBSERVER.PORT 52CONFIG.WEBSERVER.URL = CONFIG.WEBSERVER.SCHEME + '://' + CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT
53 53
54// --------------------------------------------------------------------------- 54// ---------------------------------------------------------------------------
55 55
diff --git a/server/initializers/database.js b/server/initializers/database.js
index 632040b81..0564e4e77 100644
--- a/server/initializers/database.js
+++ b/server/initializers/database.js
@@ -22,7 +22,7 @@ const database = {
22 22
23function connect () { 23function connect () {
24 mongoose.Promise = global.Promise 24 mongoose.Promise = global.Promise
25 mongoose.connect('mongodb://' + constants.CONFIG.DATABASE.HOST + ':' + constants.CONFIG.DATABASE.PORT + '/' + constants.CONFIG.DATABASE.DBNAME) 25 mongoose.connect('mongodb://' + constants.CONFIG.DATABASE.HOSTNAME + ':' + constants.CONFIG.DATABASE.PORT + '/' + constants.CONFIG.DATABASE.DBNAME)
26 mongoose.connection.on('error', function () { 26 mongoose.connection.on('error', function () {
27 throw new Error('Mongodb connection error.') 27 throw new Error('Mongodb connection error.')
28 }) 28 })
diff --git a/server/lib/friends.js b/server/lib/friends.js
index b2ad0bbb3..3f100545c 100644
--- a/server/lib/friends.js
+++ b/server/lib/friends.js
@@ -273,7 +273,7 @@ function isMe (url) {
273 const hostname = parsedUrl.hostname 273 const hostname = parsedUrl.hostname
274 const port = parseInt(parsedUrl.port) 274 const port = parseInt(parsedUrl.port)
275 275
276 const myHostname = constants.CONFIG.WEBSERVER.HOST 276 const myHostname = constants.CONFIG.WEBSERVER.HOSTNAME
277 const myPort = constants.CONFIG.WEBSERVER.PORT 277 const myPort = constants.CONFIG.WEBSERVER.PORT
278 278
279 return hostname === myHostname && port === myPort 279 return hostname === myHostname && port === myPort
diff --git a/server/models/video.js b/server/models/video.js
index 05c4f51cb..be3e80598 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -102,7 +102,7 @@ VideoSchema.pre('save', function (next) {
102 function (callback) { 102 function (callback) {
103 const options = { 103 const options = {
104 announceList: [ 104 announceList: [
105 [ constants.CONFIG.WEBSERVER.WS + '://' + constants.CONFIG.WEBSERVER.HOST + ':' + constants.CONFIG.WEBSERVER.PORT + '/tracker/socket' ] 105 [ constants.CONFIG.WEBSERVER.WS + '://' + constants.CONFIG.WEBSERVER.HOSTNAME + ':' + constants.CONFIG.WEBSERVER.PORT + '/tracker/socket' ]
106 ], 106 ],
107 urlList: [ 107 urlList: [
108 constants.CONFIG.WEBSERVER.URL + constants.STATIC_PATHS.WEBSEED + video.filename 108 constants.CONFIG.WEBSERVER.URL + constants.STATIC_PATHS.WEBSEED + video.filename