java melody removed

This commit is contained in:
Lucio Lelii 2022-07-22 10:33:12 +02:00
parent c4ea5bb05c
commit 3b0bb084b6
4 changed files with 9 additions and 12 deletions

View File

@ -8,4 +8,5 @@ FROM luciolelii/smartgears:4.0.0-SNAPSHOT
COPY ./docker/logback.xml /etc/
COPY ./docker/container.ini /etc/
RUN unzip /tomcat/webapps/storagehub.war -d /tomcat/webapps/storagehub
COPY ./docker/storage-settings.properties /tomcat/webapps/storagehub/classes/META-INF
RUN sed -i "s/{{adminId}}/$REPOUSER/g; s/{{adminPwd}}/$REPOPWD/g" /tomcat/webapps/storagehub/WEB-INF/web.xml

View File

@ -18,11 +18,14 @@ services:
# copy the sql script to create tables
# - ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
storagehub:
image: storagehub:latest
build: .
ports:
- '8081:8080'
minio:
image: minio/minio
environment:
- "MINIO_ACCESS_KEY=SHUBTEST"
- "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCY"
ports:
- '9000:9000'

View File

@ -196,14 +196,6 @@
<version>1.21</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.bull.javamelody/javamelody-core -->
<dependency>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-core</artifactId>
<version>1.82.0</version>
</dependency>
<!-- jersey & weld -->
<dependency>
<groupId>javax.servlet</groupId>

View File

@ -17,6 +17,7 @@ import io.minio.BucketExistsArgs;
import io.minio.CopyObjectArgs;
import io.minio.CopySource;
import io.minio.GetObjectArgs;
import io.minio.MakeBucketArgs;
import io.minio.MinioClient;
import io.minio.PutObjectArgs;
import io.minio.RemoveObjectArgs;
@ -55,9 +56,9 @@ public class S3Backend extends StorageBackend{
.endpoint(url)
.credentials(accessKey, secret)
.build();
if (createBucket) {
boolean bucketExists = client.bucketExists(BucketExistsArgs.builder().bucket(this.bucketName).build());
}
if (createBucket && !client.bucketExists(BucketExistsArgs.builder().bucket(this.bucketName).build()))
client.makeBucket(MakeBucketArgs.builder().bucket(this.bucketName).build());
} catch (Exception e) {
log.error("error initializing s3",e);
throw new RuntimeException("erro initializing s3", e);