mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.35.8",
|
||||
"version": "2.35.9",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -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