127 lines
3.2 KiB
YAML
127 lines
3.2 KiB
YAML
networks:
|
|
loki:
|
|
name: loki-net # replace the default domain <service>.loki-net
|
|
|
|
services:
|
|
#------- init container to change permissions of the mounted directory.
|
|
init:
|
|
image: busybox
|
|
user: root
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
chown 472:root /var/lib/grafana;
|
|
chown 101:root /etc/nginx/conf.d/default.conf;
|
|
chown nobody:nobody /prometheus -R;
|
|
exit 0;
|
|
"
|
|
volumes:
|
|
- '${GF_VOLUME_DIR}:/var/lib/grafana'
|
|
- '${PRX_NGINX_CONF_DIR}/default.conf:/etc/nginx/conf.d/default.conf'
|
|
- '${PROM_DATA_DIR}:/prometheus'
|
|
networks:
|
|
- loki
|
|
|
|
#------- container with tools dns (nslookup, tcptraceroute, etc). Use just for debug
|
|
# dns-tools:
|
|
# image: jonlabelle/network-tools
|
|
# command: tail -f /dev/null
|
|
# stdin_open: true
|
|
# tty: true
|
|
# networks:
|
|
# - loki
|
|
|
|
#-------proxy (nginx)
|
|
proxy:
|
|
image: nginxinc/nginx-unprivileged
|
|
volumes:
|
|
- ${PRX_NGINX_CONF_DIR}/default.conf:/etc/nginx/conf.d/default.conf
|
|
- ${PRX_CERTS_DIR}:/etc/nginx/certs
|
|
ports:
|
|
- "443:8443"
|
|
#- "80:8080"
|
|
networks:
|
|
- loki
|
|
restart: always
|
|
|
|
#------- minio server service
|
|
minio:
|
|
#image: minio/minio
|
|
image: minio/minio:RELEASE.2025-03-12T18-04-18Z
|
|
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}
|
|
MINIO_BROWSER_REDIRECT_URL: ${MINIO_REDIRECT_URL}
|
|
command: server /data --console-address ":9001"
|
|
networks:
|
|
- loki
|
|
|
|
#------- minio client
|
|
# minio-cli:
|
|
# image: minio/mc
|
|
# # insure that the server container is running before building the client
|
|
# depends_on:
|
|
# - minio
|
|
# entrypoint: >
|
|
# /bin/sh -c "tail -f /dev/null"
|
|
# #/usr/bin/mc admin info play;
|
|
# #/usr/bin/mc alias set myminio http://minio:9000 ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY};
|
|
# #/usr/bin/mc admin prometheus generate myminio
|
|
# ##/usr/bin/mc mb myminio/test-bucket;
|
|
# ##/usr/bin/mc mb myminio/loki-1;
|
|
# ##echo 'my content' > myfile.txt;
|
|
# ##/usr/bin/mc cp myfile.txt myminio/test-bucket;
|
|
# #exit 0;
|
|
# #"
|
|
# volumes:
|
|
# - ${MINIO_CONF_CLI_DIR}/.mc:/root/.mc
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - loki
|
|
|
|
#------- grafana
|
|
grafana:
|
|
image: grafana/grafana-enterprise
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- '${GF_VOLUME_DIR}:/var/lib/grafana'
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASS}
|
|
- GF_SERVER_ROOT_URL=${GF_ROOT_URL}
|
|
#- GF_SERVER_SERVE_FROM_SUB_PATH=true
|
|
restart: unless-stopped
|
|
networks:
|
|
- loki
|
|
|
|
#------- prometheus
|
|
prometheus:
|
|
image: prom/prometheus
|
|
volumes:
|
|
- ${PROM_CONF_DIR}/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- ${PROM_DATA_DIR}:/prometheus
|
|
ports:
|
|
- 9090:9090
|
|
restart: unless-stopped
|
|
networks:
|
|
- loki
|
|
|
|
#------- node-exporter
|
|
node-exporter:
|
|
image: prom/node-exporter
|
|
networks:
|
|
- loki
|
|
ports:
|
|
- 9100:9100
|
|
restart: unless-stopped
|
|
|
|
#volumes:
|
|
# grafana-storage:
|
|
# prometheus:
|
|
# loki: |