diff --git a/.env.dist b/.env.dist index d9b0ecd..913a3fd 100644 --- a/.env.dist +++ b/.env.dist @@ -1,3 +1,3 @@ -MINIO_DATA_ROOT_DIR= +MINIO_DATA_ROOT_DIR= MINIO_ACCESS_KEY=minio -MINIO_SECRET_KEY=minio123 \ No newline at end of file +MINIO_SECRET_KEY=minio123 diff --git a/README.md b/README.md index 5c9c1e7..5188c19 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # Grafana-Loki-Minio ## Description +This dokcer run stack grafana, loki, promtail, minio +### Container +| Name | URL | Description | +|:---|:---|:---| +| dns-tools | - | container with dns tools (just use for debug)| +| minio-server | UI: `http://;9001`
API: `http://;9000`| container minio server UI and API | ## Requirements ### Minio Create the folder where the minio data will be stored @@ -22,11 +28,26 @@ docker compose up -d ## Access -* Minio - http://* :9001 - +**dns-tools** +```bash +docker exec -it dns-tools /bin/bash +``` +```bash +dig minio-server +ping minio-server +nslookup minio-server +``` + +**Minio console** +http://:9001 + ## Sources +### Minio * 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 + +### Grafana +* https://grafana.com/docs/loki/latest/setup/install/docker/ \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 69f2606..fcb0da9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,30 +1,55 @@ +networks: + loki: + name: loki-net # replace the default domain .loki-net + 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; -# " + # container with tools dns (nslookup, tcptraceroute, etc). Use just for debug +# dns-tools: +# image: jonlabelle/network-tools +# container_name: dns-tools +# command: tail -f /dev/null +# stdin_open: true +# tty: true +# networks: +# - loki + + # minio server service + minio-server: + image: minio/minio:latest + container_name: minio-server + hostname: myhostname + 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" + networks: + - loki + + # 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; +# " +# networks: +# - loki + +#volumes: +# prometheus: +# loki: \ No newline at end of file