Skip to content

Commit

Permalink
fix(docker): minio setup (ems-project#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei authored Dec 2, 2023
1 parent 9f786ff commit 67365f3
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ services:
MINIO_SECRET_KEY: secretkey
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
test: [ "CMD", "mc", "ready", "local" ]
interval: 5s
timeout: 5s
retries: 5
labels:
- "traefik.enable=true"
- "traefik.http.routers.minio.rule=Host(`minio.localhost`)"
Expand All @@ -106,12 +106,11 @@ services:
setup_minio:
image: minio/mc
depends_on:
- minio
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c '
echo "Waiting for minio availability";
until curl -s -o /dev/null -w "%{http_code}" http://minio:9000/minio/health/live | grep -q "200"; do sleep 30; done;
echo "Minio is ready";
echo "Setup minio";
/usr/bin/mc config host rm local;
/usr/bin/mc config host add local http://minio:9000 accesskey secretkey;
/usr/bin/mc mb --ignore-existing local/demo;
Expand Down

0 comments on commit 67365f3

Please sign in to comment.