Rearanged the docker files and added empty README.md
This commit is contained in:
parent
544f947f68
commit
d11a399a5c
|
@ -1,5 +1,3 @@
|
||||||
version: "3"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
prometheus_data:
|
prometheus_data:
|
||||||
grafana_data:
|
grafana_data:
|
||||||
|
@ -17,10 +15,12 @@ services:
|
||||||
- "9090:9090"
|
- "9090:9090"
|
||||||
volumes:
|
volumes:
|
||||||
- prometheus_data:/prometheus
|
- prometheus_data:/prometheus
|
||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana-oss:10.4.2
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/grafana/Dockerfile.grafana
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
@ -28,9 +28,12 @@ services:
|
||||||
- mesh-bridge
|
- mesh-bridge
|
||||||
volumes:
|
volumes:
|
||||||
- grafana_data:/var/lib/grafana
|
- grafana_data:/var/lib/grafana
|
||||||
|
- ./docker/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
|
||||||
|
|
||||||
exporter:
|
exporter:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/exporter/Dockerfile.exporter
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
|
@ -2,10 +2,10 @@ FROM python
|
||||||
LABEL author="Gleb Tcivie"
|
LABEL author="Gleb Tcivie"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY requirements.txt .
|
COPY ../../requirements.txt .
|
||||||
COPY .env .
|
COPY ../../.env .
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt
|
||||||
|
|
||||||
COPY exporter/ exporter
|
COPY ../../exporter exporter
|
||||||
COPY main.py .
|
COPY ../../main.py .
|
||||||
CMD ["python3", "-u", "main.py"]
|
CMD ["python3", "-u", "main.py"]
|
7
docker/grafana/Dockerfile.grafana
Normal file
7
docker/grafana/Dockerfile.grafana
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM grafana/grafana-oss:10.4.2
|
||||||
|
|
||||||
|
# Install the Redis datasource plugin
|
||||||
|
RUN grafana-cli plugins install redis-datasource
|
||||||
|
|
||||||
|
# Copy the datasource configuration
|
||||||
|
COPY docker/grafana/datasources.yml /etc/grafana/provisioning/datasources/datasources.yml
|
19
docker/grafana/datasources.yml
Normal file
19
docker/grafana/datasources.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
url: http://prometheus:9090
|
||||||
|
isDefault: true
|
||||||
|
editable: true
|
||||||
|
jsonData:
|
||||||
|
httpMethod: POST
|
||||||
|
|
||||||
|
- name: redis-datasource
|
||||||
|
type: redis-datasource
|
||||||
|
access: proxy
|
||||||
|
url: redis://redis:6379/0
|
||||||
|
isDefault: false
|
||||||
|
editable: true
|
||||||
|
jsonData:
|
||||||
|
client: standalone
|
Loading…
Reference in a new issue