From de7706f1770e52057f27fef0f4ec8f06a1c950d0 Mon Sep 17 00:00:00 2001 From: Gilles Mouchet Date: Fri, 6 Jun 2025 11:02:58 +0200 Subject: [PATCH] minio ok --- .env.dist | 3 +++ .gitignore | 1 + .vscode/settings.json | 5 +++++ README.md | 32 ++++++++++++++++++++++++++++++++ docker-compose.yaml | 30 ++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 .env.dist create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 README.md create mode 100644 docker-compose.yaml diff --git a/.env.dist b/.env.dist new file mode 100644 index 0000000..d9b0ecd --- /dev/null +++ b/.env.dist @@ -0,0 +1,3 @@ +MINIO_DATA_ROOT_DIR= +MINIO_ACCESS_KEY=minio +MINIO_SECRET_KEY=minio123 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b3ee43d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "editor.fontSize": 13, + "terminal.integrated.fontSize": 13, + "window.zoomLevel": 1.4, +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5c9c1e7 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# Grafana-Loki-Minio + +## Description +## Requirements +### Minio +Create the folder where the minio data will be stored +```bash +sudo mkdir -p /home/docker/minio +``` + +Copy the `.env-dist` file to `.env` and update it with values appropriate for your setup. +```bash +MINIO_DATA_ROOT_DIR=/home/docker/minio +MINIO_ACCESS_KEY=minio +MINIO_SECRET_KEY=minio123 +``` + +## Run +```bash +docker compose up -d +``` + +## Access + +* Minio - http://* :9001 + + +## Sources +* https://thanhtunguet.info/posts/install-minio-using-docker-compose/ +* https://min.io/docs/minio/container/index.html +* https://www.nathaniel-walser.com/docker-compose-templates/minio +* https://github.com/Anagraph/minio-docker-config/blob/master/docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..69f2606 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,30 @@ +services: + # minio server service + minio-server: + image: minio/minio + restart: always + volumes: + - ${MINIO_DATA_ROOT_DIR}:/data + ports: + - "9000:9000" + - "9001:9001" + environment: + MINIO_ROOT_USER: ${MINIO_ACCESS_KEY} + MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY} + command: server /data --console-address ":9001" + # service not necessary, used here to explain how to interact from the container +#minio-client: +# image: minio/mc +# # insure that the server container is running before building the client +# depends_on: +# - minio-server +# entrypoint: > +# /bin/sh -c " +# /usr/bin/mc admin info play; +# /usr/bin/mc alias set myminio http://minio-server:9000 ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY}; +# /usr/bin/mc mb myminio/test-bucket; +# /usr/bin/mc mb myminio/loki; +# echo 'my content' > myfile.txt; +# /usr/bin/mc cp myfile.txt myminio/test-bucket; +# exit 0; +# "