Skip to content

Commit

Permalink
Add separator between volume names (#312)
Browse files Browse the repository at this point in the history
* Clean up volume names and MYSQL_ROOT_HOST to mariadb container

* Fix formatting
  • Loading branch information
Bram authored Jan 12, 2022
1 parent 5365296 commit e3d6015
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function buildDockerCompose(array $services)
->filter(function ($service) {
return in_array($service, ['mysql', 'pgsql', 'mariadb', 'redis', 'meilisearch', 'minio']);
})->map(function ($service) {
return " sail{$service}:\n driver: local";
return " sail-{$service}:\n driver: local";
})->whenNotEmpty(function ($collection) {
return $collection->prepend('volumes:');
})->implode("\n");
Expand Down
3 changes: 2 additions & 1 deletion stubs/mariadb.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
- '${FORWARD_DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- 'sailmariadb:/var/lib/mysql'
- 'sail-mariadb:/var/lib/mysql'
networks:
- sail
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion stubs/meilisearch.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ports:
- '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
volumes:
- 'sailmeilisearch:/data.ms'
- 'sail-meilisearch:/data.ms'
networks:
- sail
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion stubs/minio.stub
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
MINIO_ROOT_USER: 'sail'
MINIO_ROOT_PASSWORD: 'password'
volumes:
- 'sailminio:/data/minio'
- 'sail-minio:/data/minio'
networks:
- sail
command: minio server /data/minio --console-address ":8900"
Expand Down
2 changes: 1 addition & 1 deletion stubs/mysql.stub
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- 'sailmysql:/var/lib/mysql'
- 'sail-mysql:/var/lib/mysql'
networks:
- sail
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion stubs/pgsql.stub
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'sailpgsql:/var/lib/postgresql/data'
- 'sail-pgsql:/var/lib/postgresql/data'
networks:
- sail
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion stubs/redis.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sailredis:/data'
- 'sail-redis:/data'
networks:
- sail
healthcheck:
Expand Down

0 comments on commit e3d6015

Please sign in to comment.