mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-27 11:30:49 +00:00
MediaConfig: Change s3 config
remove region as this is specified by endPoint now add bucket in schema and actual assignment Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
5195955eb8
commit
d2bce6e091
1 changed files with 2 additions and 5 deletions
|
@ -18,7 +18,6 @@ export interface MediaConfig {
|
||||||
s3: {
|
s3: {
|
||||||
accessKeyId: string;
|
accessKeyId: string;
|
||||||
secretAccessKey: string;
|
secretAccessKey: string;
|
||||||
region: string;
|
|
||||||
bucket: string;
|
bucket: string;
|
||||||
endPoint: string;
|
endPoint: string;
|
||||||
};
|
};
|
||||||
|
@ -49,9 +48,8 @@ const mediaSchema = Joi.object({
|
||||||
then: Joi.object({
|
then: Joi.object({
|
||||||
accessKey: Joi.string().label('HD_MEDIA_BACKEND_S3_ACCESS_KEY'),
|
accessKey: Joi.string().label('HD_MEDIA_BACKEND_S3_ACCESS_KEY'),
|
||||||
secretKey: Joi.string().label('HD_MEDIA_BACKEND_S3_SECRET_KEY'),
|
secretKey: Joi.string().label('HD_MEDIA_BACKEND_S3_SECRET_KEY'),
|
||||||
|
bucket: Joi.string().label('HD_MEDIA_BACKEND_S3_BUCKET'),
|
||||||
endPoint: Joi.string().label('HD_MEDIA_BACKEND_S3_ENDPOINT'),
|
endPoint: Joi.string().label('HD_MEDIA_BACKEND_S3_ENDPOINT'),
|
||||||
secure: Joi.boolean().label('HD_MEDIA_BACKEND_S3_SECURE'),
|
|
||||||
port: Joi.number().label('HD_MEDIA_BACKEND_S3_PORT'),
|
|
||||||
}),
|
}),
|
||||||
otherwise: Joi.optional(),
|
otherwise: Joi.optional(),
|
||||||
}),
|
}),
|
||||||
|
@ -86,9 +84,8 @@ export default registerAs('mediaConfig', () => {
|
||||||
s3: {
|
s3: {
|
||||||
accessKey: process.env.HD_MEDIA_BACKEND_S3_ACCESS_KEY,
|
accessKey: process.env.HD_MEDIA_BACKEND_S3_ACCESS_KEY,
|
||||||
secretKey: process.env.HD_MEDIA_BACKEND_S3_SECRET_KEY,
|
secretKey: process.env.HD_MEDIA_BACKEND_S3_SECRET_KEY,
|
||||||
|
bucket: process.env.HD_MEDIA_BACKEND_S3_BUCKET,
|
||||||
endPoint: process.env.HD_MEDIA_BACKEND_S3_ENDPOINT,
|
endPoint: process.env.HD_MEDIA_BACKEND_S3_ENDPOINT,
|
||||||
secure: process.env.HD_MEDIA_BACKEND_S3_SECURE,
|
|
||||||
port: parseInt(process.env.HD_MEDIA_BACKEND_S3_PORT) || undefined,
|
|
||||||
},
|
},
|
||||||
azure: {
|
azure: {
|
||||||
connectionString:
|
connectionString:
|
||||||
|
|
Loading…
Reference in a new issue