fix: MinIO credentials validation in docker-compose
fix: MinIO credentials validation in docker-compose
This commit is contained in:
commit
7e0bfe6e70
2 changed files with 10 additions and 3 deletions
4
.env.example
Normal file
4
.env.example
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# MinIO credentials (used in docker-compose.yml)
|
||||||
|
# Must be at least 3 characters for MINIO_ROOT_USER and 8 characters for MINIO_ROOT_PASSWORD
|
||||||
|
MINIO_ROOT_USER=beetask123
|
||||||
|
MINIO_ROOT_PASSWORD=beetaskpassword
|
||||||
|
|
@ -27,8 +27,8 @@ services:
|
||||||
command: server /data --console-address ":9001"
|
command: server /data --console-address ":9001"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: minioadmin
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-beetask123}
|
||||||
MINIO_ROOT_PASSWORD: minioadmin
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-beetaskpassword}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
|
|
@ -42,10 +42,13 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- minio
|
- minio
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-beetask123}
|
||||||
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-beetaskpassword}
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
/bin/sh -c "
|
/bin/sh -c "
|
||||||
sleep 3 &&
|
sleep 3 &&
|
||||||
mc alias set local http://minio:9000 minioadmin minioadmin &&
|
mc alias set local http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD &&
|
||||||
mc mb --ignore-existing local/avatars &&
|
mc mb --ignore-existing local/avatars &&
|
||||||
mc anonymous set download local/avatars
|
mc anonymous set download local/avatars
|
||||||
"
|
"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue