diff options
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r-- | server/initializers/checker-after-init.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index c83fef425..0df7414be 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -4,7 +4,7 @@ import { getFFmpegVersion } from '@server/helpers/ffmpeg' | |||
4 | import { uniqify } from '@shared/core-utils' | 4 | import { uniqify } from '@shared/core-utils' |
5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | 5 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' |
6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | 6 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' |
7 | import { isProdInstance, parseSemVersion } from '../helpers/core-utils' | 7 | import { isProdInstance, parseBytes, parseSemVersion } from '../helpers/core-utils' |
8 | import { isArray } from '../helpers/custom-validators/misc' | 8 | import { isArray } from '../helpers/custom-validators/misc' |
9 | import { logger } from '../helpers/logger' | 9 | import { logger } from '../helpers/logger' |
10 | import { ApplicationModel, getServerActor } from '../models/application/application' | 10 | import { ApplicationModel, getServerActor } from '../models/application/application' |
@@ -116,6 +116,11 @@ function checkEmailConfig () { | |||
116 | throw new Error('Emailer is disabled but you require signup email verification.') | 116 | throw new Error('Emailer is disabled but you require signup email verification.') |
117 | } | 117 | } |
118 | 118 | ||
119 | if (CONFIG.SIGNUP.ENABLED && CONFIG.SIGNUP.REQUIRES_APPROVAL) { | ||
120 | // eslint-disable-next-line max-len | ||
121 | logger.warn('Emailer is disabled but signup approval is enabled: PeerTube will not be able to send an email to the user upon acceptance/rejection of the registration request') | ||
122 | } | ||
123 | |||
119 | if (CONFIG.CONTACT_FORM.ENABLED) { | 124 | if (CONFIG.CONTACT_FORM.ENABLED) { |
120 | logger.warn('Emailer is disabled so the contact form will not work.') | 125 | logger.warn('Emailer is disabled so the contact form will not work.') |
121 | } | 126 | } |
@@ -174,7 +179,8 @@ function checkRemoteRedundancyConfig () { | |||
174 | function checkStorageConfig () { | 179 | function checkStorageConfig () { |
175 | // Check storage directory locations | 180 | // Check storage directory locations |
176 | if (isProdInstance()) { | 181 | if (isProdInstance()) { |
177 | const configStorage = config.get('storage') | 182 | const configStorage = config.get<{ [ name: string ]: string }>('storage') |
183 | |||
178 | for (const key of Object.keys(configStorage)) { | 184 | for (const key of Object.keys(configStorage)) { |
179 | if (configStorage[key].startsWith('storage/')) { | 185 | if (configStorage[key].startsWith('storage/')) { |
180 | logger.warn( | 186 | logger.warn( |
@@ -278,6 +284,11 @@ function checkObjectStorageConfig () { | |||
278 | 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' | 284 | 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' |
279 | ) | 285 | ) |
280 | } | 286 | } |
287 | |||
288 | if (CONFIG.OBJECT_STORAGE.MAX_UPLOAD_PART > parseBytes('250MB')) { | ||
289 | // eslint-disable-next-line max-len | ||
290 | logger.warn(`Object storage max upload part seems to have a big value (${CONFIG.OBJECT_STORAGE.MAX_UPLOAD_PART} bytes). Consider using a lower one (like 100MB).`) | ||
291 | } | ||
281 | } | 292 | } |
282 | } | 293 | } |
283 | 294 | ||