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
4 changes: 2 additions & 2 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ AZURITE_ACCOUNT_NAME=flowphpaccount01
AZURITE_ACCOUNT_KEY=flowphpkey01
S3_ENDPOINT=http://localhost:9000
S3_REGION=us-east-1
S3_ACCESS_KEY_ID=minioadmin
S3_SECRET_ACCESS_KEY=minioadmin
S3_ACCESS_KEY_ID=flowphpaccess01
S3_SECRET_ACCESS_KEY=flowphpsecret01
S3_BUCKET=flowphpbucket01
SFTP_HOST=localhost
SFTP_PORT=2222
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/job-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,18 @@ jobs:
sleep 2
done

- name: "Start MinIO and create bucket"
- name: "Start RustFS"
run: |
docker run -d --name minio -p 9000:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
quay.io/minio/minio:latest server /data
timeout 30 sh -c 'until curl -fs http://localhost:9000/minio/health/live > /dev/null; do sleep 1; done'
docker run --rm --network=host --entrypoint sh quay.io/minio/mc:latest -c "
mc alias set local http://localhost:9000 minioadmin minioadmin &&
mc mb local/flowphpbucket01 --ignore-existing
"
docker run -d --name rustfs -p 9000:9000 \
-e RUSTFS_ACCESS_KEY=flowphpaccess01 \
-e RUSTFS_SECRET_KEY=flowphpsecret01 \
-e RUSTFS_ADDRESS=:9000 \
-e RUSTFS_CONSOLE_ENABLE=false \
-e RUSTFS_REGION=us-east-1 \
-e RUSTFS_VOLUMES=/data \
rustfs/rustfs:1.0.0
timeout 90 sh -c 'until curl -fs http://localhost:9000/health/ready > /dev/null; do sleep 1; done' \
|| { echo "RustFS did not become ready"; docker logs rustfs; exit 1; }

- name: "Start SFTP server"
run: |
Expand Down Expand Up @@ -154,8 +155,8 @@ jobs:
AZURITE_ACCOUNT_KEY: "flowphpkey01"
S3_ENDPOINT: "http://localhost:9000"
S3_REGION: "us-east-1"
S3_ACCESS_KEY_ID: "minioadmin"
S3_SECRET_ACCESS_KEY: "minioadmin"
S3_ACCESS_KEY_ID: "flowphpaccess01"
S3_SECRET_ACCESS_KEY: "flowphpsecret01"
SFTP_HOST: "localhost"
SFTP_PORT: "2222"
SFTP_USER: "flow"
Expand Down Expand Up @@ -183,8 +184,8 @@ jobs:
AZURITE_ACCOUNT_KEY: "flowphpkey01"
S3_ENDPOINT: "http://localhost:9000"
S3_REGION: "us-east-1"
S3_ACCESS_KEY_ID: "minioadmin"
S3_SECRET_ACCESS_KEY: "minioadmin"
S3_ACCESS_KEY_ID: "flowphpaccess01"
S3_SECRET_ACCESS_KEY: "flowphpsecret01"
OTEL_RECEIVER_HTTP_ENDPOINT: "http://localhost:4318"
OTEL_RECEIVER_GRPC_ENDPOINT: "localhost:4317"
OTEL_COLLECTOR_METRICS_ENDPOINT: "http://localhost:8888/metrics"
Expand Down
37 changes: 16 additions & 21 deletions compose.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,26 @@ services:
- "6379:6379"
networks:
- flow-php
minio:
image: minio/minio:latest
container_name: flow-php-minio
command: server /data --console-address ":9001"
rustfs:
image: rustfs/rustfs:1.0.0
container_name: flow-php-rustfs
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- "./var/minio:/data"
networks:
- flow-php
minio-init:
image: minio/mc
container_name: flow-php-minio-init
depends_on:
- minio
entrypoint: >
/bin/sh -c "
until mc alias set flow http://minio:9000 minioadmin minioadmin; do sleep 1; done;
mc mb flow/flowphpbucket01 --ignore-existing;
exit 0;
"
- RUSTFS_ACCESS_KEY=flowphpaccess01
- RUSTFS_SECRET_KEY=flowphpsecret01
- RUSTFS_ADDRESS=:9000
- RUSTFS_CONSOLE_ENABLE=true
- RUSTFS_CONSOLE_ADDRESS=:9001
- RUSTFS_REGION=us-east-1
- RUSTFS_VOLUMES=/data
healthcheck:
test: ["CMD-SHELL", "curl -fs http://127.0.0.1:9000/health/ready || exit 1"]
interval: 5s
timeout: 3s
retries: 12
start_period: 20s
networks:
- flow-php
sftp:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ flow_filesystem:
region: '%env(AWS_REGION)%'
access_key_id: '%env(AWS_ACCESS_KEY_ID)%'
access_key_secret: '%env(AWS_SECRET_ACCESS_KEY)%'
endpoint: ~ # optional, MinIO/R2/Scaleway/LocalStack
endpoint: ~ # optional, RustFS/R2/Scaleway/LocalStack
path_style_endpoint: false
profile: ~
debug: false
Expand Down
13 changes: 13 additions & 0 deletions documentation/contributing/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ copy `.env.dist` to `.env` (gitignored) and set the shifted values there - `.env
cp .env.dist .env
```

> **Upgrading from an older checkout** - the local S3 service moved from MinIO to
> [RustFS](https://rustfs.com/) (MinIO deleted its community images from Docker Hub) and the S3 credentials changed from
> `minioadmin` to `flowphpaccess01` / `flowphpsecret01`. Refresh **both** files, otherwise every S3 request fails with
> `SignatureDoesNotMatch`:
>
> ```shell
> docker compose down -v
> rm -rf var/minio
> cp compose.yml.dist compose.yml
> cp .env.dist .env # or update S3_ACCESS_KEY_ID / S3_SECRET_ACCESS_KEY in your existing .env
> docker compose up -d
> ```

> If you keep a personal gitignored `phpunit.xml`, regenerate it from `phpunit.xml.dist` after pulling this change: the
> new `.dist` uses `bootstrap="bootstrap.php"` and no longer carries the `<php><env>` block (env now comes from `.env.dist`
> / `.env`). A stale `phpunit.xml` keeps the old bootstrap and env, bypassing the shared config.
Expand Down
Loading