Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add healthcheck for minio, fix seeder container names, and reduce object size #185

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/seeder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ type config struct {
BLOBS3DisableSSL bool `envconfig:"BLOB_S3_DISABLE_SSL" default:"false"`
BLOBS3ForcePathStyle bool `envconfig:"BLOB_S3_FORCE_PATH_STYLE" default:"true"`

CreateNamespaces int `envconfig:"CREATE_NAMESPACES" default:"100"`
CreateNamespaces int `envconfig:"CREATE_NAMESPACES" default:"10"`
CreateContainersPerNamespace int `envconfig:"CREATE_CONTAINERS_PER_NAMESPACE" default:"100"`
CreateVersionsPerContainer int `envconfig:"CREATE_VERSIONS_PER_CONTAINER" default:"100"`
CreateObjectsPerVersion int `envconfig:"CREATE_OBJECTS_PER_VERSION" default:"100"`
MaxObjectSizeBytes int `envconfig:"MAX_OBJECT_SIZE_BYTES" default:"4194304"`
MaxObjectSizeBytes int `envconfig:"MAX_OBJECT_SIZE_BYTES" default:"4096"`
}

func main() {
Expand Down Expand Up @@ -108,7 +108,7 @@ func main() {
panic(err)
}
for j := 0; j <= cfg.CreateContainersPerNamespace; j++ {
container := fmt.Sprintf("container-%06d", i)
container := fmt.Sprintf("container-%06d", j)
if err := managerSvc.CreateContainer(ctx, namespace, container); err != nil {
panic(err)
}
Expand Down
18 changes: 17 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ services:
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9001"]
interval: 10s
timeout: 10s
retries: 3
start_period: 10s
start_interval: 5s

migrator:
build:
Expand Down Expand Up @@ -53,6 +60,8 @@ services:
depends_on:
postgresql:
condition: service_healthy
migrator:
condition: service_completed_successfully

manager:
build:
Expand All @@ -64,14 +73,18 @@ services:
METADATA_DSN: postgres://postgres:password@postgresql?sslmode=disable
BLOB_S3_ENDPOINT: http://minio:9000
BLOB_S3_BUCKET: test-bucket
BLOB_S3_CREATE_BUCKET: "false"
BLOB_S3_CREATE_BUCKET: "true"
BLOB_S3_ACCESS_KEY_ID: minioadmin
BLOB_S3_SECRET_KEY: minioadmin
ports:
- "5555:5555"
depends_on:
postgresql:
condition: service_healthy
minio:
condition: service_healthy
migrator:
condition: service_completed_successfully

# seeder:
# build:
Expand All @@ -81,13 +94,16 @@ services:
# environment:
# LOG_LEVEL: info
# METADATA_DSN: postgres://postgres:password@postgresql?sslmode=disable
# BLOB_S3_CREATE_BUCKET: "true"
# BLOB_S3_ENDPOINT: http://minio:9000
# BLOB_S3_BUCKET: test-bucket
# BLOB_S3_ACCESS_KEY_ID: minioadmin
# BLOB_S3_SECRET_KEY: minioadmin
# depends_on:
# postgresql:
# condition: service_healthy
# minio:
# condition: service_healthy
# migrator:
# condition: service_completed_successfully

Expand Down
Loading