diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker-after-init.ts | 10 | ||||
-rw-r--r-- | server/initializers/checker-before-init.ts | 6 | ||||
-rw-r--r-- | server/initializers/config.ts | 12 | ||||
-rw-r--r-- | server/initializers/constants.ts | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index 906a918e3..5ef72058b 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -217,7 +217,7 @@ function checkStorageConfig () { | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | if (CONFIG.STORAGE.VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) { | 220 | if (CONFIG.STORAGE.WEB_VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) { |
221 | logger.warn('Redundancy directory should be different than the videos folder.') | 221 | logger.warn('Redundancy directory should be different than the videos folder.') |
222 | } | 222 | } |
223 | } | 223 | } |
@@ -290,7 +290,7 @@ function checkLiveConfig () { | |||
290 | function checkObjectStorageConfig () { | 290 | function checkObjectStorageConfig () { |
291 | if (CONFIG.OBJECT_STORAGE.ENABLED === true) { | 291 | if (CONFIG.OBJECT_STORAGE.ENABLED === true) { |
292 | 292 | ||
293 | if (!CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME) { | 293 | if (!CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME) { |
294 | throw new Error('videos_bucket should be set when object storage support is enabled.') | 294 | throw new Error('videos_bucket should be set when object storage support is enabled.') |
295 | } | 295 | } |
296 | 296 | ||
@@ -299,10 +299,10 @@ function checkObjectStorageConfig () { | |||
299 | } | 299 | } |
300 | 300 | ||
301 | if ( | 301 | if ( |
302 | CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME && | 302 | CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME && |
303 | CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.PREFIX | 303 | CONFIG.OBJECT_STORAGE.WEB_VIDEOS.PREFIX === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.PREFIX |
304 | ) { | 304 | ) { |
305 | if (CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === '') { | 305 | if (CONFIG.OBJECT_STORAGE.WEB_VIDEOS.PREFIX === '') { |
306 | throw new Error('Object storage bucket prefixes should be set when the same bucket is used for both types of video.') | 306 | throw new Error('Object storage bucket prefixes should be set when the same bucket is used for both types of video.') |
307 | } | 307 | } |
308 | 308 | ||
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 3d117d1b9..a872fcba3 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -18,7 +18,7 @@ function checkMissedConfig () { | |||
18 | 'database.hostname', 'database.port', 'database.username', 'database.password', 'database.pool.max', | 18 | 'database.hostname', 'database.port', 'database.username', 'database.password', 'database.pool.max', |
19 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', | 19 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', |
20 | 'email.body.signature', 'email.subject.prefix', | 20 | 'email.body.signature', 'email.subject.prefix', |
21 | 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', | 21 | 'storage.avatars', 'storage.web_videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', |
22 | 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins', 'storage.well_known', | 22 | 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins', 'storage.well_known', |
23 | 'log.level', 'log.rotation.enabled', 'log.rotation.max_file_size', 'log.rotation.max_files', 'log.anonymize_ip', | 23 | 'log.level', 'log.rotation.enabled', 'log.rotation.max_file_size', 'log.rotation.max_files', 'log.anonymize_ip', |
24 | 'log.log_ping_requests', 'log.log_tracker_unknown_infohash', 'log.prettify_sql', 'log.accept_client_log', | 24 | 'log.log_ping_requests', 'log.log_tracker_unknown_infohash', 'log.prettify_sql', 'log.accept_client_log', |
@@ -60,8 +60,8 @@ function checkMissedConfig () { | |||
60 | 'object_storage.enabled', 'object_storage.endpoint', 'object_storage.region', 'object_storage.upload_acl.public', | 60 | 'object_storage.enabled', 'object_storage.endpoint', 'object_storage.region', 'object_storage.upload_acl.public', |
61 | 'object_storage.upload_acl.private', 'object_storage.proxy.proxify_private_files', 'object_storage.credentials.access_key_id', | 61 | 'object_storage.upload_acl.private', 'object_storage.proxy.proxify_private_files', 'object_storage.credentials.access_key_id', |
62 | 'object_storage.credentials.secret_access_key', 'object_storage.max_upload_part', 'object_storage.streaming_playlists.bucket_name', | 62 | 'object_storage.credentials.secret_access_key', 'object_storage.max_upload_part', 'object_storage.streaming_playlists.bucket_name', |
63 | 'object_storage.streaming_playlists.prefix', 'object_storage.streaming_playlists.base_url', 'object_storage.videos.bucket_name', | 63 | 'object_storage.streaming_playlists.prefix', 'object_storage.streaming_playlists.base_url', 'object_storage.web_videos.bucket_name', |
64 | 'object_storage.videos.prefix', 'object_storage.videos.base_url', | 64 | 'object_storage.web_videos.prefix', 'object_storage.web_videos.base_url', |
65 | 'theme.default', | 65 | 'theme.default', |
66 | 'feeds.videos.count', 'feeds.comments.count', | 66 | 'feeds.videos.count', 'feeds.comments.count', |
67 | 'geo_ip.enabled', 'geo_ip.country.database_url', | 67 | 'geo_ip.enabled', 'geo_ip.country.database_url', |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 5301a1708..37cd852f1 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -106,9 +106,9 @@ const CONFIG = { | |||
106 | TMP_DIR: buildPath(config.get<string>('storage.tmp')), | 106 | TMP_DIR: buildPath(config.get<string>('storage.tmp')), |
107 | TMP_PERSISTENT_DIR: buildPath(config.get<string>('storage.tmp_persistent')), | 107 | TMP_PERSISTENT_DIR: buildPath(config.get<string>('storage.tmp_persistent')), |
108 | BIN_DIR: buildPath(config.get<string>('storage.bin')), | 108 | BIN_DIR: buildPath(config.get<string>('storage.bin')), |
109 | ACTOR_IMAGES: buildPath(config.get<string>('storage.avatars')), | 109 | ACTOR_IMAGES_DIR: buildPath(config.get<string>('storage.avatars')), |
110 | LOG_DIR: buildPath(config.get<string>('storage.logs')), | 110 | LOG_DIR: buildPath(config.get<string>('storage.logs')), |
111 | VIDEOS_DIR: buildPath(config.get<string>('storage.videos')), | 111 | WEB_VIDEOS_DIR: buildPath(config.get<string>('storage.web_videos')), |
112 | STREAMING_PLAYLISTS_DIR: buildPath(config.get<string>('storage.streaming_playlists')), | 112 | STREAMING_PLAYLISTS_DIR: buildPath(config.get<string>('storage.streaming_playlists')), |
113 | REDUNDANCY_DIR: buildPath(config.get<string>('storage.redundancy')), | 113 | REDUNDANCY_DIR: buildPath(config.get<string>('storage.redundancy')), |
114 | THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')), | 114 | THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')), |
@@ -140,10 +140,10 @@ const CONFIG = { | |||
140 | PROXY: { | 140 | PROXY: { |
141 | PROXIFY_PRIVATE_FILES: config.get<boolean>('object_storage.proxy.proxify_private_files') | 141 | PROXIFY_PRIVATE_FILES: config.get<boolean>('object_storage.proxy.proxify_private_files') |
142 | }, | 142 | }, |
143 | VIDEOS: { | 143 | WEB_VIDEOS: { |
144 | BUCKET_NAME: config.get<string>('object_storage.videos.bucket_name'), | 144 | BUCKET_NAME: config.get<string>('object_storage.web_videos.bucket_name'), |
145 | PREFIX: config.get<string>('object_storage.videos.prefix'), | 145 | PREFIX: config.get<string>('object_storage.web_videos.prefix'), |
146 | BASE_URL: config.get<string>('object_storage.videos.base_url') | 146 | BASE_URL: config.get<string>('object_storage.web_videos.base_url') |
147 | }, | 147 | }, |
148 | STREAMING_PLAYLISTS: { | 148 | STREAMING_PLAYLISTS: { |
149 | BUCKET_NAME: config.get<string>('object_storage.streaming_playlists.bucket_name'), | 149 | BUCKET_NAME: config.get<string>('object_storage.streaming_playlists.bucket_name'), |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index d87aa6f54..5116c6396 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -881,8 +881,8 @@ const DIRECTORIES = { | |||
881 | }, | 881 | }, |
882 | 882 | ||
883 | VIDEOS: { | 883 | VIDEOS: { |
884 | PUBLIC: CONFIG.STORAGE.VIDEOS_DIR, | 884 | PUBLIC: CONFIG.STORAGE.WEB_VIDEOS_DIR, |
885 | PRIVATE: join(CONFIG.STORAGE.VIDEOS_DIR, 'private') | 885 | PRIVATE: join(CONFIG.STORAGE.WEB_VIDEOS_DIR, 'private') |
886 | }, | 886 | }, |
887 | 887 | ||
888 | HLS_REDUNDANCY: join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') | 888 | HLS_REDUNDANCY: join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') |