Skip to content

Commit 7024a23

Browse files
committed
🔧(compose) replace minio by rustfs
Minio is no longer maintained, its git repository is archived. We need to replace it. We decided to choose rustfs minio/minio@7aac2a2 https://github.com/rustfs/rustfs
1 parent fa0c384 commit 7024a23

3 files changed

Lines changed: 50 additions & 36 deletions

File tree

compose.yml

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,44 @@ services:
2222
ports:
2323
- "1081:1080"
2424

25-
minio:
25+
rustfs:
2626
user: ${DOCKER_USER:-1000}
27-
image: minio/minio
27+
image: rustfs/rustfs:latest
2828
environment:
29-
- MINIO_ROOT_USER=impress
30-
- MINIO_ROOT_PASSWORD=password
29+
- RUSTFS_ACCESS_KEY=rustfsadmin
30+
- RUSTFS_SECRET_KEY=rustfsadmin
31+
- RUSTFS_CONSOLE_ENABLE=true
32+
- RUSTFS_ADDRESS=0.0.0.0:9000
33+
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
34+
- RUSTFS_CORS_ALLOWED_ORIGINS=*
35+
- RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=*
3136
ports:
32-
- '9000:9000'
33-
- '9001:9001'
37+
- "9000:9000"
38+
- "9001:9001"
3439
healthcheck:
35-
test: ["CMD", "mc", "ready", "local"]
36-
interval: 1s
37-
timeout: 20s
38-
retries: 300
39-
entrypoint: ""
40-
command: minio server --console-address :9001 /data
40+
test:
41+
[
42+
"CMD",
43+
"sh",
44+
"-c",
45+
"curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health",
46+
]
47+
interval: 30s
48+
timeout: 10s
49+
retries: 3
50+
start_period: 40s
4151
volumes:
4252
- ./data/media:/data
4353

4454
createbuckets:
4555
image: minio/mc
4656
depends_on:
47-
minio:
57+
rustfs:
4858
condition: service_healthy
4959
restart: true
5060
entrypoint: >
5161
sh -c "
52-
/usr/bin/mc alias set impress http://minio:9000 impress password && \
62+
/usr/bin/mc alias set impress http://rustfs:9000 rustfsadmin rustfsadmin && \
5363
/usr/bin/mc mb impress/impress-media-storage && \
5464
/usr/bin/mc version enable impress/impress-media-storage && \
5565
exit 0;"
@@ -81,16 +91,16 @@ services:
8191
- ./src/backend:/app
8292
- ./data/static:/data/static
8393
depends_on:
84-
postgresql:
85-
condition: service_healthy
86-
restart: true
87-
mailcatcher:
88-
condition: service_started
89-
redis:
90-
condition: service_started
91-
createbuckets:
92-
condition: service_started
93-
94+
postgresql:
95+
condition: service_healthy
96+
restart: true
97+
mailcatcher:
98+
condition: service_started
99+
redis:
100+
condition: service_started
101+
createbuckets:
102+
condition: service_started
103+
94104
celery-dev:
95105
user: ${DOCKER_USER:-1000}
96106
image: impress:backend-development
@@ -131,7 +141,7 @@ services:
131141

132142
frontend-development:
133143
user: "${DOCKER_USER:-1000}"
134-
build:
144+
build:
135145
context: .
136146
dockerfile: ./src/frontend/Dockerfile
137147
target: impress-dev
@@ -161,13 +171,13 @@ services:
161171
image: node:22
162172
user: "${DOCKER_USER:-1000}"
163173
environment:
164-
HOME: /tmp
174+
HOME: /tmp
165175
volumes:
166176
- ".:/app"
167177

168178
y-provider-development:
169179
user: ${DOCKER_USER:-1000}
170-
build:
180+
build:
171181
context: .
172182
dockerfile: ./src/frontend/servers/y-provider/Dockerfile
173183
target: y-provider-development
@@ -209,7 +219,11 @@ services:
209219
- --health-enabled=true
210220
- --metrics-enabled=true
211221
healthcheck:
212-
test: ['CMD-SHELL', 'exec 3<>/dev/tcp/localhost/9000; echo -e "GET /health/live HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n" >&3; grep "HTTP/1.1 200 OK" <&3']
222+
test:
223+
[
224+
"CMD-SHELL",
225+
'exec 3<>/dev/tcp/localhost/9000; echo -e "GET /health/live HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n" >&3; grep "HTTP/1.1 200 OK" <&3',
226+
]
213227
start_period: 5s
214228
interval: 1s
215229
timeout: 2s
@@ -223,7 +237,7 @@ services:
223237
KC_DB_PASSWORD: pass
224238
KC_DB_USERNAME: impress
225239
KC_DB_SCHEMA: public
226-
PROXY_ADDRESS_FORWARDING: 'true'
240+
PROXY_ADDRESS_FORWARDING: "true"
227241
ports:
228242
- "8080:8080"
229243
depends_on:

docker/files/etc/nginx/conf.d/default.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ server {
1717
proxy_set_header X-Amz-Date $authDate;
1818
proxy_set_header X-Amz-Content-SHA256 $authContentSha256;
1919

20-
# Get resource from Minio
21-
proxy_pass http://minio:9000/impress-media-storage/;
22-
proxy_set_header Host minio:9000;
20+
# Get resource from rustfs
21+
proxy_pass http://rustfs:9000/impress-media-storage/;
22+
proxy_set_header Host rustfs:9000;
2323

2424
add_header Content-Security-Policy "default-src 'none'" always;
2525
}
@@ -30,7 +30,7 @@ server {
3030
proxy_set_header X-Real-IP $remote_addr;
3131
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3232
proxy_set_header X-Original-URL $request_uri;
33-
33+
3434
# Prevent the body from being passed
3535
proxy_pass_request_body off;
3636
proxy_set_header Content-Length "";

env.d/development/common

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ IMPRESS_BASE_URL="http://localhost:8072"
2727

2828
# Media
2929
STORAGES_STATICFILES_BACKEND=django.contrib.staticfiles.storage.StaticFilesStorage
30-
AWS_S3_ENDPOINT_URL=http://minio:9000
31-
AWS_S3_ACCESS_KEY_ID=impress
32-
AWS_S3_SECRET_ACCESS_KEY=password
30+
AWS_S3_ENDPOINT_URL=http://rustfs:9000
31+
AWS_S3_ACCESS_KEY_ID=rustfsadmin
32+
AWS_S3_SECRET_ACCESS_KEY=rustfsadmin
3333
MEDIA_BASE_URL=http://localhost:8083
3434

3535
# OIDC

0 commit comments

Comments
 (0)