aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-20 16:14:55 +0200
committerChocobozzz <me@florianbigard.com>2021-10-20 16:29:41 +0200
commit97b6428af78d7b00d9b57e1a317d1355f5e76939 (patch)
treeda8aecbb965ba77d9bf26accf0468a24de9a8d65
parent400043b1be38cdd7bc39462fa6a545eea0bea03e (diff)
downloadPeerTube-97b6428af78d7b00d9b57e1a317d1355f5e76939.tar.gz
PeerTube-97b6428af78d7b00d9b57e1a317d1355f5e76939.tar.zst
PeerTube-97b6428af78d7b00d9b57e1a317d1355f5e76939.zip
Breaking: fix inconsistencies in configuration
-rw-r--r--config/default.yaml26
-rw-r--r--config/production.yaml.example26
-rw-r--r--server/initializers/config.ts6
-rw-r--r--support/docker/production/config/production.yaml4
4 files changed, 31 insertions, 31 deletions
diff --git a/config/default.yaml b/config/default.yaml
index a8d070cc8..c46d0e883 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -34,7 +34,7 @@ rates_limit:
34trust_proxy: 34trust_proxy:
35 - 'loopback' 35 - 'loopback'
36 36
37# Your database name will be database.name OR "peertube"+database.suffix 37# Your database name will be database.name OR 'peertube'+database.suffix
38database: 38database:
39 hostname: 'localhost' 39 hostname: 'localhost'
40 port: 5432 40 port: 5432
@@ -71,9 +71,9 @@ smtp:
71 71
72email: 72email:
73 body: 73 body:
74 signature: "PeerTube" 74 signature: 'PeerTube'
75 subject: 75 subject:
76 prefix: "[PeerTube]" 76 prefix: '[PeerTube]'
77 77
78# PeerTube client/interface configuration 78# PeerTube client/interface configuration
79client: 79client:
@@ -145,9 +145,9 @@ log:
145 level: 'info' # 'debug' | 'info' | 'warn' | 'error' 145 level: 'info' # 'debug' | 'info' | 'warn' | 'error'
146 rotation: 146 rotation:
147 enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate 147 enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate
148 maxFileSize: 12MB 148 max_file_size: 12MB
149 maxFiles: 20 149 max_files: 20
150 anonymizeIP: false 150 anonymize_ip: false
151 log_ping_requests: true 151 log_ping_requests: true
152 prettify_sql: false 152 prettify_sql: false
153 153
@@ -294,7 +294,7 @@ user:
294 video_quota: -1 294 video_quota: -1
295 video_quota_daily: -1 295 video_quota_daily: -1
296 296
297# If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag 297# If enabled, the video will be transcoded to mp4 (x264) with `faststart` flag
298# In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions. 298# In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
299# Please, do not disable transcoding since many uploaded videos will not work 299# Please, do not disable transcoding since many uploaded videos will not work
300transcoding: 300transcoding:
@@ -400,7 +400,7 @@ import:
400 # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl 400 # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
401 proxy: 401 proxy:
402 enabled: false 402 enabled: false
403 url: "" 403 url: ''
404 torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file) 404 torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
405 enabled: false 405 enabled: false
406 406
@@ -434,7 +434,7 @@ instance:
434 business_model: '' # Supports Markdown 434 business_model: '' # Supports Markdown
435 435
436 # If you want to explain on what type of hardware your PeerTube instance runs 436 # If you want to explain on what type of hardware your PeerTube instance runs
437 # Example: "2 vCore, 2GB RAM..." 437 # Example: '2 vCore, 2GB RAM...'
438 hardware_information: '' # Supports Markdown 438 hardware_information: '' # Supports Markdown
439 439
440 # What are the main languages of your instance? To interact with your users for example 440 # What are the main languages of your instance? To interact with your users for example
@@ -474,20 +474,20 @@ instance:
474 # Enabling it will allow other administrators to know that you are mainly federating sensitive content 474 # Enabling it will allow other administrators to know that you are mainly federating sensitive content
475 # Moreover, the NSFW checkbox on video upload will be automatically checked by default 475 # Moreover, the NSFW checkbox on video upload will be automatically checked by default
476 is_nsfw: false 476 is_nsfw: false
477 # By default, "do_not_list" or "blur" or "display" NSFW videos 477 # By default, `do_not_list` or `blur` or `display` NSFW videos
478 # Could be overridden per user with a setting 478 # Could be overridden per user with a setting
479 default_nsfw_policy: 'do_not_list' 479 default_nsfw_policy: 'do_not_list'
480 480
481 customizations: 481 customizations:
482 javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime 482 javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
483 css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime 483 css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
484 # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' 484 # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add `/` to `Disallow:`
485 robots: | 485 robots: |
486 User-agent: * 486 User-agent: *
487 Disallow: 487 Disallow:
488 # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. 488 # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
489 securitytxt: 489 securitytxt:
490 "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" 490 '# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:'
491 491
492services: 492services:
493 # Cards configuration to format video in Twitter 493 # Cards configuration to format video in Twitter
@@ -495,7 +495,7 @@ services:
495 username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published 495 username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
496 # If true, a video player will be embedded in the Twitter feed on PeerTube video share 496 # If true, a video player will be embedded in the Twitter feed on PeerTube video share
497 # If false, we use an image link card that will redirect on your PeerTube instance 497 # If false, we use an image link card that will redirect on your PeerTube instance
498 # Change it to "true", and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted 498 # Change it to `true`, and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted
499 whitelisted: false 499 whitelisted: false
500 500
501followers: 501followers:
diff --git a/config/production.yaml.example b/config/production.yaml.example
index bc9f28e95..d023070e3 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -32,7 +32,7 @@ rates_limit:
32trust_proxy: 32trust_proxy:
33 - 'loopback' 33 - 'loopback'
34 34
35# Your database name will be database.name OR "peertube"+database.suffix 35# Your database name will be database.name OR 'peertube'+database.suffix
36database: 36database:
37 hostname: 'localhost' 37 hostname: 'localhost'
38 port: 5432 38 port: 5432
@@ -69,9 +69,9 @@ smtp:
69 69
70email: 70email:
71 body: 71 body:
72 signature: "PeerTube" 72 signature: 'PeerTube'
73 subject: 73 subject:
74 prefix: "[PeerTube]" 74 prefix: '[PeerTube]'
75 75
76# PeerTube client/interface configuration 76# PeerTube client/interface configuration
77client: 77client:
@@ -143,9 +143,9 @@ log:
143 level: 'info' # 'debug' | 'info' | 'warn' | 'error' 143 level: 'info' # 'debug' | 'info' | 'warn' | 'error'
144 rotation: 144 rotation:
145 enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate 145 enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate
146 maxFileSize: 12MB 146 max_file_size: 12MB
147 maxFiles: 20 147 max_files: 20
148 anonymizeIP: false 148 anonymize_ip: false
149 log_ping_requests: true 149 log_ping_requests: true
150 prettify_sql: false 150 prettify_sql: false
151 151
@@ -304,7 +304,7 @@ user:
304 video_quota: -1 304 video_quota: -1
305 video_quota_daily: -1 305 video_quota_daily: -1
306 306
307# If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag 307# If enabled, the video will be transcoded to mp4 (x264) with `faststart` flag
308# In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions. 308# In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
309# Please, do not disable transcoding since many uploaded videos will not work 309# Please, do not disable transcoding since many uploaded videos will not work
310transcoding: 310transcoding:
@@ -410,7 +410,7 @@ import:
410 # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl 410 # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
411 proxy: 411 proxy:
412 enabled: false 412 enabled: false
413 url: "" 413 url: ''
414 torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file) 414 torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
415 enabled: false 415 enabled: false
416 416
@@ -444,7 +444,7 @@ instance:
444 business_model: '' # Supports Markdown 444 business_model: '' # Supports Markdown
445 445
446 # If you want to explain on what type of hardware your PeerTube instance runs 446 # If you want to explain on what type of hardware your PeerTube instance runs
447 # Example: "2 vCore, 2GB RAM..." 447 # Example: '2 vCore, 2GB RAM...'
448 hardware_information: '' # Supports Markdown 448 hardware_information: '' # Supports Markdown
449 449
450 # What are the main languages of your instance? To interact with your users for example 450 # What are the main languages of your instance? To interact with your users for example
@@ -484,20 +484,20 @@ instance:
484 # Enabling it will allow other administrators to know that you are mainly federating sensitive content 484 # Enabling it will allow other administrators to know that you are mainly federating sensitive content
485 # Moreover, the NSFW checkbox on video upload will be automatically checked by default 485 # Moreover, the NSFW checkbox on video upload will be automatically checked by default
486 is_nsfw: false 486 is_nsfw: false
487 # By default, "do_not_list" or "blur" or "display" NSFW videos 487 # By default, `do_not_list` or `blur` or `display` NSFW videos
488 # Could be overridden per user with a setting 488 # Could be overridden per user with a setting
489 default_nsfw_policy: 'do_not_list' 489 default_nsfw_policy: 'do_not_list'
490 490
491 customizations: 491 customizations:
492 javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime 492 javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
493 css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime 493 css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
494 # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:' 494 # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add `/` to `Disallow:`
495 robots: | 495 robots: |
496 User-agent: * 496 User-agent: *
497 Disallow: 497 Disallow:
498 # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string. 498 # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
499 securitytxt: 499 securitytxt:
500 "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:" 500 '# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:'
501 501
502services: 502services:
503 # Cards configuration to format video in Twitter 503 # Cards configuration to format video in Twitter
@@ -505,7 +505,7 @@ services:
505 username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published 505 username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
506 # If true, a video player will be embedded in the Twitter feed on PeerTube video share 506 # If true, a video player will be embedded in the Twitter feed on PeerTube video share
507 # If false, we use an image link card that will redirect on your PeerTube instance 507 # If false, we use an image link card that will redirect on your PeerTube instance
508 # Change it to "true", and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted 508 # Change it to `true`, and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted
509 whitelisted: false 509 whitelisted: false
510 510
511followers: 511followers:
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 48bb5ab8e..3a7c72a1c 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -131,10 +131,10 @@ const CONFIG = {
131 LEVEL: config.get<string>('log.level'), 131 LEVEL: config.get<string>('log.level'),
132 ROTATION: { 132 ROTATION: {
133 ENABLED: config.get<boolean>('log.rotation.enabled'), 133 ENABLED: config.get<boolean>('log.rotation.enabled'),
134 MAX_FILE_SIZE: bytes.parse(config.get<string>('log.rotation.maxFileSize')), 134 MAX_FILE_SIZE: bytes.parse(config.get<string>('log.rotation.max_file_size')),
135 MAX_FILES: config.get<number>('log.rotation.maxFiles') 135 MAX_FILES: config.get<number>('log.rotation.max_files')
136 }, 136 },
137 ANONYMIZE_IP: config.get<boolean>('log.anonymizeIP'), 137 ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'),
138 LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'), 138 LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'),
139 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql') 139 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql')
140 }, 140 },
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml
index 3bff8a0b0..54d619b1a 100644
--- a/support/docker/production/config/production.yaml
+++ b/support/docker/production/config/production.yaml
@@ -2,7 +2,7 @@ listen:
2 hostname: '0.0.0.0' 2 hostname: '0.0.0.0'
3 port: 9000 3 port: 9000
4 4
5# Correspond to your reverse proxy "listen" configuration 5# Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
6webserver: 6webserver:
7 https: true 7 https: true
8 hostname: undefined 8 hostname: undefined
@@ -26,7 +26,7 @@ trust_proxy:
26 - 'linklocal' 26 - 'linklocal'
27 - 'uniquelocal' 27 - 'uniquelocal'
28 28
29# Your database name will be database.name or "peertube"+database.suffix 29# Your database name will be database.name OR 'peertube'+database.suffix
30database: 30database:
31 hostname: 'postgres' 31 hostname: 'postgres'
32 port: 5432 32 port: 5432