Skip to content

Commit

Permalink
Add MinIO to sail:install Command (laravel#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
2 people authored and oddvalue committed May 26, 2021
1 parent d6fde00 commit d41760f
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 @@ -65,6 +65,7 @@ protected function gatherServicesWithSymfonyMenu()
'redis',
'memcached',
'meilisearch',
'minio',
'mailhog',
'selenium',
], 0, null, true);
Expand Down Expand Up @@ -120,7 +121,7 @@ protected function buildDockerCompose(string $runtime, 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 d41760f

Please sign in to comment.