Merge pull request #5523 from RoadieHQ/tech-docs-s3-like-services

Tech docs with s3-like services
This commit is contained in:
Anders Näsman
2021-04-30 11:48:55 +02:00
committed by GitHub
5 changed files with 27 additions and 0 deletions
@@ -80,10 +80,17 @@ export class AwsS3Publish implements PublisherBase {
'techdocs.publisher.awsS3.endpoint',
);
// AWS forcePathStyle is an optional config. If missing, it defaults to false. Needs to be enabled for cases
// where endpoint url points to locally hosted S3 compatible storage like Localstack
const s3ForcePathStyle = config.getOptionalBoolean(
'techdocs.publisher.awsS3.s3ForcePathStyle',
);
const storageClient = new aws.S3({
credentials,
...(region && { region }),
...(endpoint && { endpoint }),
...(s3ForcePathStyle && { s3ForcePathStyle }),
});
return new AwsS3Publish(storageClient, bucketName, logger);