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:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
@ -17,10 +15,12 @@ services:
|
|||
- "9090:9090"
|
||||
volumes:
|
||||
- prometheus_data:/prometheus
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana-oss:10.4.2
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/grafana/Dockerfile.grafana
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
@ -28,9 +28,12 @@ services:
|
|||
- mesh-bridge
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./docker/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
|
||||
|
||||
exporter:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/exporter/Dockerfile.exporter
|
||||
restart: unless-stopped
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
|
|
@ -2,10 +2,10 @@ FROM python
|
|||
LABEL author="Gleb Tcivie"
|
||||
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
COPY .env .
|
||||
COPY ../../requirements.txt .
|
||||
COPY ../../.env .
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY exporter/ exporter
|
||||
COPY main.py .
|
||||
COPY ../../exporter exporter
|
||||
COPY ../../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