Skip to content

Commit 8b97beb

Browse files
authored
Add rustfs service to Docker Compose and update service list (#822)
* Add rustfs service to Docker Compose and update service list * Fix RUSTFS_LOG_LEVEL formatting in rustfs.stub
1 parent efdc917 commit 8b97beb

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

src/Console/Concerns/InteractsWithDockerComposeServices.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ trait InteractsWithDockerComposeServices
3535
'meilisearch',
3636
'typesense',
3737
'minio',
38+
'rustfs',
3839
'mailpit',
3940
'rabbitmq',
4041
'selenium',
@@ -107,7 +108,7 @@ protected function buildDockerCompose(array $services)
107108
// Merge volumes...
108109
collect($services)
109110
->filter(function ($service) {
110-
return in_array($service, ['mysql', 'pgsql', 'mariadb', 'mongodb', 'redis', 'valkey', 'meilisearch', 'typesense', 'minio', 'rabbitmq']);
111+
return in_array($service, ['mysql', 'pgsql', 'mariadb', 'mongodb', 'redis', 'valkey', 'meilisearch', 'typesense', 'minio', 'rustfs', 'rabbitmq']);
111112
})->filter(function ($service) use ($compose) {
112113
return ! array_key_exists($service, $compose['volumes'] ?? []);
113114
})->each(function ($service) use (&$compose) {

stubs/rustfs.stub

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
rustfs:
2+
image: 'rustfs/rustfs:latest'
3+
ports:
4+
- '${FORWARD_RUSTFS_PORT:-9000}:9000'
5+
- '${FORWARD_RUSTFS_CONSOLE_PORT:-9001}:9001'
6+
environment:
7+
RUSTFS_VOLUMES: '/data'
8+
RUSTFS_ADDRESS: '0.0.0.0:9000'
9+
RUSTFS_CONSOLE_ADDRESS: '0.0.0.0:9001'
10+
RUSTFS_CONSOLE_ENABLE: 'true'
11+
RUSTFS_EXTERNAL_ADDRESS: ':9000'
12+
RUSTFS_CORS_ALLOWED_ORIGINS: '*'
13+
RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS: '*'
14+
RUSTFS_ACCESS_KEY: 'sail'
15+
RUSTFS_SECRET_KEY: 'password'
16+
RUSTFS_LOG_LEVEL: 'info',
17+
volumes:
18+
- 'sail-rustfs:/data'
19+
networks:
20+
- sail
21+
healthcheck:
22+
test:
23+
[
24+
"CMD",
25+
"sh", "-c",
26+
"curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/health"
27+
]
28+
interval: 30s
29+
timeout: 10s
30+
retries: 3
31+
start_period: 40s

0 commit comments

Comments
 (0)