Skip to content

Commit 5aa5f7f

Browse files
committed
chore: fix minio
1 parent 17eb119 commit 5aa5f7f

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

docker-compose.build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ services:
6464
redis:
6565
condition: service_started
6666
minio:
67-
condition: service_started
67+
condition: service_healthy
6868
minio_create_buckets:
6969
condition: service_started
7070
opensearch:
@@ -161,7 +161,7 @@ services:
161161
redis:
162162
condition: service_started
163163
minio:
164-
condition: service_started
164+
condition: service_healthy
165165
minio_create_buckets:
166166
condition: service_started
167167
opensearch:

docker-compose.infra.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ services:
9595
image: opensearchproject/opensearch:latest
9696
container_name: opensearch
9797
environment:
98-
- 'DISABLE_SECURITY_PLUGIN=true'
9998
- discovery.type=single-node
10099
- http.port=9200
101100
- http.cors.enabled=true
@@ -104,6 +103,7 @@ services:
104103
- http.cors.allow-credentials=true
105104
- bootstrap.memory_lock=true
106105
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
106+
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD:-Gauzy_password_123}
107107
ulimits:
108108
memlock:
109109
soft: -1
@@ -186,6 +186,11 @@ services:
186186
MINIO_ROOT_USER: ever-gauzy-access-key
187187
MINIO_ROOT_PASSWORD: ever-gauzy-secret-key
188188
command: server /data --address :9000 --console-address ":9001"
189+
healthcheck:
190+
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
191+
interval: 5s
192+
timeout: 5s
193+
retries: 5
189194
ports:
190195
- 9000:9000
191196
- 9001:9001
@@ -204,10 +209,15 @@ services:
204209
- "until (/usr/bin/mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD) do
205210
echo 'Waiting to start minio...' && sleep 1;
206211
done;
212+
if /usr/bin/mc ls minio/ever-gauzy >/dev/null 2>&1; then
213+
echo 'Bucket already exists, skipping creation.';
214+
else
207215
/usr/bin/mc mb minio/ever-gauzy --region=eu-north-1;
216+
fi;
208217
exit 0;"
209218
depends_on:
210-
- minio
219+
minio:
220+
condition: service_healthy
211221
networks:
212222
- overlay
213223

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
redis:
5858
condition: service_started
5959
minio:
60-
condition: service_started
60+
condition: service_healthy
6161
minio_create_buckets:
6262
condition: service_started
6363
opensearch:
@@ -126,7 +126,7 @@ services:
126126
redis:
127127
condition: service_started
128128
minio:
129-
condition: service_started
129+
condition: service_healthy
130130
minio_create_buckets:
131131
condition: service_started
132132
opensearch:

0 commit comments

Comments
 (0)