Created
November 12, 2021 10:38
-
-
Save ruggi/5f64a27b67534535fc3fbaa7e2f4cbdc to your computer and use it in GitHub Desktop.
minIO quick and dirty docker-compose setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.4" | |
services: | |
# ... | |
minio: | |
image: minio/minio | |
container_name: minio | |
volumes: | |
- minio-data:/data | |
ports: | |
- "9000:9000" | |
environment: | |
MINIO_ACCESS_KEY: minio | |
MINIO_SECRET_KEY: minio123 | |
command: server /data | |
healthcheck: | |
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] | |
interval: 30s | |
timeout: 20s | |
retries: 3 | |
minio-init: # used to set up the uploads bucket and set public policy on objects to mimic CDN distribution | |
image: minio/mc | |
depends_on: | |
- minio | |
entrypoint: > # Replace <BUCKET-NAME> with whatever you need :) | |
/bin/sh -c " | |
sleep 2 && | |
/usr/bin/mc config host add minio http://minio:9000 minio minio123 && ( | |
/usr/bin/mc stat minio/<BUCKET-NAME> || /usr/bin/mc mb minio/<BUCKET-NAME> | |
) && | |
/usr/bin/mc policy set public minio/<BUCKET-NAME> | |
" | |
# ... | |
volumes: | |
# ... | |
minio-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment