Skip to content
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
13 changes: 10 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,17 @@ jobs:
sleep 2
done

- name: Wait for MinIO bucket initialization
- name: Wait for the MinIO test bucket
run: |
echo "Waiting for MinIO bucket initialization..."
docker wait bowphp_minio_init || true
echo "Waiting for the public 'tests' bucket on MinIO..."
for i in {1..30}; do
if [ "$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:9000/tests/)" = "200" ]; then
echo "MinIO bucket is ready!"
break
fi
echo "Waiting for MinIO... ($i/30)"
sleep 2
done

- name: Cache Composer packages
id: composer-cache
Expand Down
27 changes: 9 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,37 +146,28 @@ services:
retries: 5
minio:
container_name: bowphp_minio
image: minio/minio
# MinIO removed its images from Docker Hub (minio/minio and minio/mc
# now return "object not found") and quay.io requires a login, which
# broke `docker compose up` in CI. Bitnami's frozen legacy archive is
# the drop-in: same API and ports, and it creates the test bucket
# itself through MINIO_DEFAULT_BUCKETS, so no `mc` init container.
image: bitnamilegacy/minio:latest
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
# bucket:policy — a public "tests" bucket, as minio-init used to create.
MINIO_DEFAULT_BUCKETS: "tests:public"
networks:
- bowphp_network
healthcheck:
test: ["CMD", "mc", "alias", "set", "local", "http://localhost:9000", "minioadmin", "minioadmin"]
test: ["CMD", "curl", "-sf", "http://localhost:9000/minio/health/ready"]
interval: 10s
timeout: 5s
retries: 5
minio-init:
container_name: bowphp_minio_init
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 minioadmin minioadmin;
mc mb --ignore-existing local/tests;
mc anonymous set public local/tests;
exit 0;
"
networks:
- bowphp_network
zookeeper:
container_name: bowphp_zookeeper
image: confluentinc/cp-zookeeper:7.5.0
Expand Down
Loading