diff --git a/cmd/seeder/main.go b/cmd/seeder/main.go index 3de187f..cba473f 100644 --- a/cmd/seeder/main.go +++ b/cmd/seeder/main.go @@ -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() { @@ -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) } diff --git a/docker-compose.yaml b/docker-compose.yaml index 30f2889..d9846b7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: @@ -53,6 +60,8 @@ services: depends_on: postgresql: condition: service_healthy + migrator: + condition: service_completed_successfully manager: build: @@ -64,7 +73,7 @@ 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: @@ -72,6 +81,10 @@ services: depends_on: postgresql: condition: service_healthy + minio: + condition: service_healthy + migrator: + condition: service_completed_successfully # seeder: # build: @@ -81,6 +94,7 @@ 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 @@ -88,6 +102,8 @@ services: # depends_on: # postgresql: # condition: service_healthy + # minio: + # condition: service_healthy # migrator: # condition: service_completed_successfully