X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconfig.ts;h=be9fc61f083a43be735410f93eab0a01c33ef992;hb=ab632f438efed53e3ed4ba08dd73cc666366af2b;hp=5281d3a666386cd33dd7b5a091d9837d339b5d8b;hpb=4024c44f9027a32809931de0692d40d001df721c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 5281d3a66..be9fc61f0 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -1,4 +1,4 @@ -import * as bytes from 'bytes' +import bytes from 'bytes' import { IConfig } from 'config' import decache from 'decache' import { dirname, join } from 'path' @@ -73,6 +73,26 @@ const CONFIG = { PLUGINS_DIR: buildPath(config.get('storage.plugins')), CLIENT_OVERRIDES_DIR: buildPath(config.get('storage.client_overrides')) }, + OBJECT_STORAGE: { + ENABLED: config.get('object_storage.enabled'), + MAX_UPLOAD_PART: bytes.parse(config.get('object_storage.max_upload_part')), + ENDPOINT: config.get('object_storage.endpoint'), + REGION: config.get('object_storage.region'), + CREDENTIALS: { + ACCESS_KEY_ID: config.get('object_storage.credentials.access_key_id'), + SECRET_ACCESS_KEY: config.get('object_storage.credentials.secret_access_key') + }, + VIDEOS: { + BUCKET_NAME: config.get('object_storage.videos.bucket_name'), + PREFIX: config.get('object_storage.videos.prefix'), + BASE_URL: config.get('object_storage.videos.base_url') + }, + STREAMING_PLAYLISTS: { + BUCKET_NAME: config.get('object_storage.streaming_playlists.bucket_name'), + PREFIX: config.get('object_storage.streaming_playlists.prefix'), + BASE_URL: config.get('object_storage.streaming_playlists.base_url') + } + }, WEBSERVER: { SCHEME: config.get('webserver.https') === true ? 'https' : 'http', WS: config.get('webserver.https') === true ? 'wss' : 'ws', @@ -185,6 +205,7 @@ const CONFIG = { get ENABLED () { return config.get('signup.enabled') }, get LIMIT () { return config.get('signup.limit') }, get REQUIRES_EMAIL_VERIFICATION () { return config.get('signup.requires_email_verification') }, + get MINIMUM_AGE () { return config.get('signup.minimum_age') }, FILTERS: { CIDR: { get WHITELIST () { return config.get('signup.filters.cidr.whitelist') },