Skip to content

Commit 2a19462

Browse files
update storage env
1 parent 9da245c commit 2a19462

File tree

3 files changed

+40
-16
lines changed

3 files changed

+40
-16
lines changed

.env.example

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,22 @@ IGRP_KEYCLOAK_CLIENT_ID=access-management
1818
IGRP_KEYCLOAK_CLIENT_SECRET=************
1919
IGRP_KEYCLOAK_GRANT_TYPE=client_credentials
2020

21-
# File Storage configuration (Amazon AWS S3)
21+
# File Storage configuration (Choose between 'minio' and 's3')
2222
IGRP_STORAGE_PROVIDER=s3
23-
S3_ENDPOINT=http://localhost:9000
24-
S3_SECURITY=false
25-
S3_ACCESS_KEY=admin
26-
S3_SECRET_KEY=admin12345678
27-
S3_BUCKET_NAME=igrp
28-
S3_PATH_STYLE_ACCESS=true
29-
S3_REGION=praia
23+
IGRP_STORAGE_SECURITY=false
24+
IGRP_STORAGE_ACCESS_KEY=admin
25+
IGRP_STORAGE_SECRET_KEY=admin12345678
26+
IGRP_STORAGE_BUCKET_NAME=igrp
27+
IGRP_STORAGE_PATH_STYLE_ACCESS=true
28+
IGRP_STORAGE_REGION=praia
29+
30+
# For AWS S3, override AWS endpoint (provide full URL including protocol, e.g., http://localhost:9000)
31+
# If not provided it will map from IGRP_STORAGE_ENDPOINT and IGRP_STORAGE_PORT, resulting in http://IGRP_STORAGE_ENDPOINT:IGRP_STORAGE_PORT
32+
IGRP_S3_AWS_ENDPOINT=http://localhost:9000
33+
34+
# For minIO, the endpoint and port should be provided separetely
35+
IGRP_STORAGE_ENDPOINT=localhost
36+
IGRP_STORAGE_PORT=9000
3037

3138
# Cache configuration (Redis)
3239
REDIS_HOST=redis

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@
207207
<artifactId>aws-s3</artifactId>
208208
<version>0.1.0-beta.3</version>
209209
</dependency>
210+
<dependency>
211+
<groupId>cv.igrp.framework.filemanager</groupId>
212+
<artifactId>minio</artifactId>
213+
<version>0.1.0-beta.4</version>
214+
</dependency>
210215
<dependency>
211216
<groupId>cv.igrp.framework</groupId>
212217
<artifactId>notifications-core</artifactId>

src/main/resources/application.properties

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,26 @@ springdoc.swagger-ui.operationsSorter=method
2828

2929
# Storage
3030
igrp.storage-provider=${IGRP_STORAGE_PROVIDER:s3}
31-
igrp.s3.aws-endpoint=${S3_ENDPOINT}
32-
igrp.s3.secure=${S3_SECURITY}
33-
igrp.s3.aws-access-key=${S3_ACCESS_KEY}
34-
igrp.s3.aws-secret-key=${S3_SECRET_KEY}
35-
igrp.s3.aws-bucket=${S3_BUCKET_NAME}
36-
igrp.s3.aws-path-style-access=${S3_PATH_STYLE_ACCESS:true}
37-
igrp.s3.aws-url-expiration-time=${S3_PRESIGNED_URL_EXPIRATION_TIME:300}
38-
igrp.s3.aws-region=${S3_REGION:us-east-1}
31+
igrp.minio.endpoint=${IGRP_STORAGE_ENDPOINT}
32+
igrp.minio.port=${IGRP_STORAGE_PORT}
33+
igrp.minio.security=${IGRP_STORAGE_SECURITY}
34+
igrp.minio.access-key=${IGRP_STORAGE_ACCESS_KEY}
35+
igrp.minio.secret-key=${IGRP_STORAGE_SECRET_KEY}
36+
igrp.minio.bucket-name=${IGRP_STORAGE_BUCKET_NAME:igrp}
37+
igrp.minio.url-expiration-time=${IGRP_STORAGE_PRESIGNED_URL_EXPIRATION_TIME:300}
38+
igrp.minio.region=${IGRP_STORAGE_REGION:us-east-1}
39+
igrp.s3.aws-endpoint=http://${IGRP_STORAGE_ENDPOINT}:${IGRP_STORAGE_PORT}
40+
igrp.s3.aws-access-key=${IGRP_STORAGE_ACCESS_KEY}
41+
igrp.s3.aws-secret-key=${IGRP_STORAGE_SECRET_KEY}
42+
igrp.s3.secure=${IGRP_STORAGE_SECURITY}
43+
igrp.s3.aws-bucket=${IGRP_STORAGE_BUCKET_NAME:igrp}
44+
igrp.s3.aws-url-expiration-time=${IGRP_STORAGE_PRESIGNED_URL_EXPIRATION_TIME:300}
45+
igrp.s3.aws-region=${IGRP_STORAGE_REGION:us-east-1}
46+
igrp.s3.aws-path-style-access=${IGRP_STORAGE_PATH_STYLE_ACCESS:true}
47+
# File manager Logging - Minio/S3
48+
logging.level.io.minio=DEBUG
49+
logging.level.io.awss3=DEBUG
50+
logging.level.cv.igrp.platform.filemanager=DEBUG
3951

4052
# Authentication
4153
igrp.keycloak.server-url=${IGRP_KEYCLOAK_SERVER_URL}

0 commit comments

Comments
 (0)