Skip to content

Commit

Permalink
Add MinIO to sail:install Command (#128)
Browse files Browse the repository at this point in the history
* add minio support

* move default values to minio stub

* Update InstallCommand.php

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
c-fitzmaurice and taylorotwell authored May 14, 2021
1 parent 1818fa4 commit 2de8237
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected function gatherServicesWithSymfonyMenu()
'redis',
'memcached',
'meilisearch',
'minio',
'mailhog',
'selenium',
], 0, null, true);
Expand Down Expand Up @@ -83,7 +84,7 @@ protected function buildDockerCompose(array $services)

$volumes = collect($services)
->filter(function ($service) {
return in_array($service, ['mysql', 'pgsql', 'mariadb', 'redis', 'meilisearch']);
return in_array($service, ['mysql', 'pgsql', 'mariadb', 'redis', 'meilisearch', 'minio']);
})->map(function ($service) {
return " sail{$service}:\n driver: local";
})->whenNotEmpty(function ($collection) {
Expand Down
14 changes: 14 additions & 0 deletions stubs/minio.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
minio:
image: 'minio/minio:latest'
ports:
- '${FORWARD_MINIO_PORT:-9000}:9000'
environment:
MINIO_ROOT_USER: 'sail'
MINIO_ROOT_PASSWORD: 'password'
volumes:
- 'sailminio:/data/minio'
networks:
- sail
command: minio server /data/minio
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

0 comments on commit 2de8237

Please sign in to comment.