@james said in MiroTalk SFU: Recording not possible?:
Would it be possible to add the option to configure the S3Client endpoint config and S3Client forcePathStyle config?
So the goal is to avoid hard-coding support only for AWS S3.
To extend the configuration so it also supports any S3-compatible storage (MinIO, Wasabi, DigitalOcean Spaces, etc.), i need to add the following to the .env file:
AWS_S3_ENDPOINT= # e.g., http://localhost:9000 for MinIO
AWS_S3_FORCE_PATH_STYLE=false # Set to true for S3-compatible services
Then expose these values in config.js:
aws: {
// ...
endpoint: process.env.AWS_S3_ENDPOINT || '',
forcePathStyle: process.env.AWS_S3_FORCE_PATH_STYLE === 'true',
},
Finally, update the S3 client configuration in Server.js:
const s3Client = new S3Client({
// ...
endpoint: config?.integrations?.aws?.endpoint || undefined,
forcePathStyle: config?.integrations?.aws?.forcePathStyle === true,
});
With this setup, the application continues to work with AWS S3 as it currently does, but can also switch to any S3-compatible service simply by adjusting environment variables and no additional code changes required.
Sounds good to me! @James just confirm.