Log
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kekskurse 2022-01-15 01:32:55 +01:00
parent f05098621e
commit af37be72f8
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
2 changed files with 63 additions and 1 deletions

56
docker-compose-beta.yml Normal file
View file

@ -0,0 +1,56 @@
networks:
intern:
web:
external: true
services:
kuvia:
image: kekskurse/kuvia
networks:
- web
- intern
environment:
DB_MIGRATION: "user:password@tcp(db:3306)/dbname?multiStatements=true"
DB_CONNECTION: "user:password@tcp(db:3306)/dbname?multiStatements=true"
S3_HOST: "s3:9000"
S3_ID: "example"
S3_SECRET: "password"
S3_TOKEN: ""
S3_BUCKET: "img"
REDIS_HORST: "redis:6379"
REDIS_DB: 0
links:
- db
- redis
- s3
labels:
- traefik.enable=true
- traefik.http.routers.kuvia-beta.rule=Host("beta.kuvia.cloud")
- traefik.http.routers.kuvia-beta.tls=true
- traefik.http.routers.kuvia-beta.tls.certresolver=le
- traefik.http.services.kuvia-beta.loadbalancer.server.port=2830
- traefik.docker.network=web
db:
image: mariadb
networks:
- intern
environment:
MARIADB_ROOT_PASSWORD: example
MARIADB_DATABASE: dbname
MARIADB_USER: user
MARIADB_PASSWORD: password
volumes:
- ./hdd-mysql:/var/lib/mysql
redis:
image: redis
networks:
- intern
s3:
image: quay.io/minio/minio
networks:
- intern
environment:
MINIO_ROOT_USER: example
MINIO_ROOT_PASSWORD: password
volumes:
- ./hdd-s3:/data
command: server /data --console-address ":9001"

View file

@ -95,7 +95,13 @@ func s3Connect() {
log.Fatal().Err(err).Msg("Cant check S3 Bucket exists")
}
if bucketexists == false {
minioClient.MakeBucket(ctx, os.Getenv("S3_BUCKET"), minio.MakeBucketOptions{})
log.Info().Msg("Create S3 Bucket")
err = minioClient.MakeBucket(ctx, os.Getenv("S3_BUCKET"), minio.MakeBucketOptions{})
if err != nil {
log.Fatal().Str("Bucket-Name", os.Getenv("S3_BUCKET")).Err(err).Msg("Cant Create S3 Bucklet")
}
} else {
log.Debug().Msg("Bucket already exists")
}
s3 = minioClient