Skip to content

Commit c242f84

Browse files
authored
RustFS (#65)
* update: remove minio * update: add rustfs * docs: add rustfs * update: switch to a 5 minute health check
1 parent 3819e36 commit c242f84

5 files changed

Lines changed: 45 additions & 36 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
.DS_Store
22
.idea
3-
docker/data-source-tools/storage
4-
docker/data-source-tools/storage/*
5-

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,28 @@ cd ./devop-tools/docker/data-source-services && docker compose up --build -d
3131
* Run `set COMPOSE_CONVERT_WINDOWS_PATHS=1` in your CMD or PowerShell terminal
3232
* Optionally, [read](https://github.com/docker/compose/issues/4303#issuecomment-379563170) this bug report.
3333

34+
### RustFS
35+
_For running an S3 service locally._
36+
37+
* Edit the `/etc/hosts` file on your system and make a reference for `127.0.0.1 s3.docker`
38+
* To create buckets or view their files, you can access the console at: http://localhost:9001
39+
* Username: rustfsadmin
40+
* Password: rustfsadmin
41+
* Modify the project's `.env` as follows:
42+
* `FILESYSTEM_DRIVER=s3`
43+
* `AWS_ACCESS_KEY_ID=rustfsadmin`
44+
* `AWS_SECRET_ACCESS_KEY=rustfsadmin`
45+
* `AWS_DEFAULT_REGION=us-east-1`
46+
* `AWS_BUCKET=[project-bucket-name]`
47+
* `AWS_ENDPOINT=http://s3.docker:9000`
48+
* `AWS_USE_PATH_STYLE_ENDPOINT=true`
49+
3450
---
3551

3652
## Data Source Tools
3753
* Optionally included is the following tools:
3854
* phpMyAdmin
3955
* Mailpit
40-
* MinIO
4156

4257
```bash
4358
cd ./devop-tools/docker/data-source-tools && docker compose up --build -d
@@ -63,23 +78,6 @@ _For mimicking an email inbox (ala mailtrap) for local usage._
6378
* `MAIL_PASSWORD=null`
6479
* `MAIL_ENCRYPTION=null`
6580

66-
### MinIO
67-
_For running an S3 service locally._
68-
69-
* Edit the `/etc/hosts` file on your system and make a reference for `127.0.0.1 s3.docker`
70-
* Open the admin console http://s3.docker:10001 and login.
71-
* username: root
72-
* password: password
73-
* Create an appropriate bucket for each project as needed.
74-
* Modify the project's `.env` as follows:
75-
* `FILESYSTEM_DRIVER=s3`
76-
* `AWS_ACCESS_KEY_ID=root`
77-
* `AWS_SECRET_ACCESS_KEY=password`
78-
* `AWS_DEFAULT_REGION=us-east-1`
79-
* `AWS_BUCKET=[project-bucket-name]`
80-
* `AWS_ENDPOINT=http://s3.docker:10000`
81-
* `AWS_USE_PATH_STYLE_ENDPOINT=true`
82-
8381
---
8482

8583
## Scripts

docker/data-source-services/docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,33 @@ services:
3838
- MYSQL_PASSWORD=mariadb_pass
3939
networks:
4040
- st-internal
41+
rustfs:
42+
container_name: sourcetoad_rustfs
43+
image: rustfs/rustfs:1.0.0-alpha.79
44+
ports:
45+
- "9000:9000"
46+
- "9001:9001"
47+
environment:
48+
- RUSTFS_VOLUMES=/data
49+
- RUSTFS_ADDRESS=0.0.0.0:9000
50+
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
51+
- RUSTFS_CONSOLE_ENABLE=true
52+
- RUSTFS_EXTERNAL_ADDRESS=:9000
53+
- RUSTFS_CORS_ALLOWED_ORIGINS=*
54+
- RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=*
55+
- RUSTFS_LOG_LEVEL=info
56+
volumes:
57+
- ./storage/rustfs:/data
58+
networks:
59+
st-internal:
60+
aliases:
61+
- s3.docker
62+
healthcheck:
63+
test: ["CMD", "sh", "-c", "curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/health"]
64+
interval: 5m
65+
timeout: 10s
66+
retries: 3
67+
start_period: 40s
4168
networks:
4269
st-internal:
4370
external: true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

docker/data-source-tools/docker-compose.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,6 @@ services:
1212
MP_MAX_MESSAGES: 5000
1313
MP_SMTP_AUTH_ACCEPT_ANY: 1
1414
MP_SMTP_AUTH_ALLOW_INSECURE: 1
15-
minio:
16-
hostname: s3.docker
17-
image: minio/minio:latest
18-
container_name: sourcetoad_minio
19-
ports:
20-
- "10000:10000"
21-
- "10001:10001"
22-
volumes:
23-
- ./storage/data:/data
24-
environment:
25-
- MINIO_ROOT_USER=root
26-
- MINIO_ROOT_PASSWORD=password
27-
command: server /data/ --address :10000 --console-address :10001
28-
networks:
29-
- st-internal
3015
phpmyadmin:
3116
image: phpmyadmin/phpmyadmin:latest
3217
container_name: sourcetoad_phpmyadmin

0 commit comments

Comments
 (0)