mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: storage: load from env
This commit is contained in:
1 parent
461b486891
commit
6762e22bae
2 files changed
+6
-1
No files matched your search
@@ -99,6 +99,11 @@ class StorageService {
|
||||
endPointForUser,
|
||||
endPointForJudge,
|
||||
};
|
||||
if (process.env.MINIO_ACCESS_KEY && process.env.MINIO_SECRET_KEY) {
|
||||
logger.info('Using MinIO key from environment variables');
|
||||
this.opts.accessKey = process.env.MINIO_ACCESS_KEY;
|
||||
this.opts.secretKey = process.env.MINIO_SECRET_KEY;
|
||||
}
|
||||
this.client = new Client({
|
||||
...parseMainEndpointUrl(this.opts.endPoint),
|
||||
pathStyle: this.opts.pathStyle,
|
||||
|
||||
Reference in new issue
Block a user