Skip to content

Commit 882fe57

Browse files
committed
chore(dev): use RustFS as the local S3-compatible dev store
- Replace the MinIO dev container with a vendor-neutral "objectstore" service running rustfs/rustfs. - Update .env/example.env to S3_* app config plus RUSTFS_* container credentials; the app/worker stay vendor-neutral (S3_* only). - Start with `docker compose --profile objectstore up`.
1 parent 721dcb8 commit 882fe57

3 files changed

Lines changed: 77 additions & 44 deletions

File tree

docker-compose-develop.yml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ services:
1212
- FLASK_ENV=development
1313
- CELERY_BROKER_URL=redis://redis:6379/0
1414
- CELERY_RESULT_BACKEND=redis://redis:6379/0
15-
# Optional object storage. Set MINIO_ENABLED=true and start the "minio"
16-
# profile (docker compose --profile minio up) to use
17-
- MINIO_ENABLED=${MINIO_ENABLED:-false}
18-
- MINIO_ENDPOINT=${MINIO_ENDPOINT}
19-
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
20-
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
21-
- MINIO_BUCKET_NAME=${MINIO_BUCKET_NAME}
15+
# Optional object storage. Set STORAGE_ENABLED=true and start the
16+
# "objectstore" profile (docker compose --profile objectstore up).
17+
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
18+
- S3_ENDPOINT=${S3_ENDPOINT}
19+
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
20+
- S3_SECRET_KEY=${S3_SECRET_KEY}
21+
- S3_BUCKET=${S3_BUCKET}
22+
- S3_USE_SSL=${S3_USE_SSL:-false}
2223
- PROFILES_PATH=/app/profiles
2324
depends_on:
2425
- redis
@@ -31,7 +32,15 @@ services:
3132
environment:
3233
- CELERY_BROKER_URL=redis://redis:6379/0
3334
- CELERY_RESULT_BACKEND=redis://redis:6379/0
34-
- MINIO_ENABLED=${MINIO_ENABLED:-false}
35+
# The worker builds its storage client from these, so it needs the full
36+
# S3 config (not just the enabled flag).
37+
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
38+
- S3_ENDPOINT=${S3_ENDPOINT}
39+
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
40+
- S3_SECRET_KEY=${S3_SECRET_KEY}
41+
- S3_BUCKET=${S3_BUCKET}
42+
- S3_USE_SSL=${S3_USE_SSL:-false}
43+
- PROFILES_PATH=/app/profiles
3544
depends_on:
3645
- redis
3746
volumes:
@@ -42,21 +51,23 @@ services:
4251
ports:
4352
- "6379:6379"
4453

45-
minio:
46-
image: "minio/minio"
47-
# Started with `docker compose --profile minio up`.
54+
objectstore:
55+
image: "rustfs/rustfs:latest"
56+
# Local S3-compatible object store (RustFS) for development.
57+
# Started with `docker compose --profile objectstore up`.
4858
profiles:
49-
- minio
59+
- objectstore
5060
ports:
5161
- "9000:9000"
5262
- "9001:9001"
5363
environment:
54-
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
55-
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
56-
- MINIO_BROWSER_REDIRECT_PORT=9001
57-
command: server --console-address ":9001" /data
64+
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY}
65+
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}
66+
- RUSTFS_VOLUMES=/data
67+
- RUSTFS_ADDRESS=0.0.0.0:9000
68+
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
5869
volumes:
59-
- minio_data:/data
70+
- objectstore_data:/data
6071

6172
volumes:
62-
minio_data:
73+
objectstore_data:

docker-compose.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ services:
1111
- FLASK_ENV=development
1212
- CELERY_BROKER_URL=redis://redis:6379/0
1313
- CELERY_RESULT_BACKEND=redis://redis:6379/0
14-
# Optional object storage. Set MINIO_ENABLED=true and start the "minio"
15-
# profile (docker compose --profile minio up) to use
16-
- MINIO_ENABLED=${MINIO_ENABLED:-false}
17-
- MINIO_ENDPOINT=${MINIO_ENDPOINT}
18-
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
19-
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
20-
- MINIO_BUCKET_NAME=${MINIO_BUCKET_NAME}
14+
# Optional object storage. Set STORAGE_ENABLED=true and start the
15+
# "objectstore" profile (docker compose --profile objectstore up).
16+
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
17+
- S3_ENDPOINT=${S3_ENDPOINT}
18+
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
19+
- S3_SECRET_KEY=${S3_SECRET_KEY}
20+
- S3_BUCKET=${S3_BUCKET}
21+
- S3_USE_SSL=${S3_USE_SSL:-false}
2122
depends_on:
2223
- redis
2324

@@ -28,7 +29,14 @@ services:
2829
environment:
2930
- CELERY_BROKER_URL=redis://redis:6379/0
3031
- CELERY_RESULT_BACKEND=redis://redis:6379/0
31-
- MINIO_ENABLED=${MINIO_ENABLED:-false}
32+
# The worker builds its storage client from these, so it needs the full
33+
# S3 config (not just the enabled flag).
34+
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
35+
- S3_ENDPOINT=${S3_ENDPOINT}
36+
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
37+
- S3_SECRET_KEY=${S3_SECRET_KEY}
38+
- S3_BUCKET=${S3_BUCKET}
39+
- S3_USE_SSL=${S3_USE_SSL:-false}
3240
depends_on:
3341
- redis
3442

@@ -37,21 +45,23 @@ services:
3745
ports:
3846
- "6379:6379"
3947

40-
minio:
41-
image: "minio/minio"
42-
# Started with `docker compose --profile minio up`.
48+
objectstore:
49+
image: "rustfs/rustfs:latest"
50+
# Local S3-compatible object store (RustFS) for development.
51+
# Started with `docker compose --profile objectstore up`.
4352
profiles:
44-
- minio
53+
- objectstore
4554
ports:
4655
- "9000:9000"
4756
- "9001:9001"
4857
environment:
49-
- MINIO_ROOT_USER=${MINIO_ROOT_USER}
50-
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
51-
- MINIO_BROWSER_REDIRECT_PORT=9001
52-
command: server --console-address ":9001" /data
58+
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY}
59+
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}
60+
- RUSTFS_VOLUMES=/data
61+
- RUSTFS_ADDRESS=0.0.0.0:9000
62+
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
5363
volumes:
54-
- minio_data:/data
64+
- objectstore_data:/data
5565

5666
volumes:
57-
minio_data:
67+
objectstore_data:

example.env

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
# MinIO is off by default; only the stateless validation endpoint is exposed when
2-
# disabled. The MINIO_* vars below and the "minio" docker-compose profile are
3-
#only needed when this is true.
4-
MINIO_ENABLED=false
1+
# Object storage is disabled by default; only the stateless metadata validation
2+
# endpoint is exposed. Set STORAGE_ENABLED=true (and start the "objectstore"
3+
# compose profile) to enable the store-backed, ID-based endpoints.
4+
STORAGE_ENABLED=false
55

6-
MINIO_ROOT_USER=minioadmin
7-
MINIO_ROOT_PASSWORD=minioadmin
8-
MINIO_BUCKET_NAME=ro-crates
9-
MINIO_ENDPOINT=minio:9000
6+
# Application object-storage client. Works against any S3-compatible store
7+
# (RustFS, MinIO, Ceph, AWS S3) via the endpoint below. For local development
8+
# this points at the "objectstore" container (RustFS).
9+
S3_ENDPOINT=objectstore:9000
10+
S3_ACCESS_KEY=rustfsadmin
11+
S3_SECRET_KEY=rustfsadmin
12+
S3_BUCKET=ro-crates
13+
S3_USE_SSL=false
14+
# S3_REGION=us-east-1
15+
# S3_CRATE_PREFIX=crates
16+
# S3_RESULTS_PREFIX=validation-results
17+
18+
# Credentials for the local RustFS dev container (the "objectstore" compose
19+
# profile, development only). These match the S3 credentials above.
20+
RUSTFS_ACCESS_KEY=rustfsadmin
21+
RUSTFS_SECRET_KEY=rustfsadmin

0 commit comments

Comments
 (0)