Skip to content

Commit

Permalink
Merge pull request #29 from veekaybee/docker-fix
Browse files Browse the repository at this point in the history
Fixing Docker network communication
  • Loading branch information
veekaybee committed Jun 27, 2023
2 parents a020638 + 9772f6a commit c364f36
Show file tree
Hide file tree
Showing 3 changed files with 2,292 additions and 14 deletions.
23 changes: 14 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ services:
- redis-data:/data
container_name: redis
ports:
- '127.0.0.1:6379:6379'
logging:
driver: gelf
options:
gelf-address: udp://localhost:12201
tag: redis
- '6379:6379'

flask:
build:
Expand Down Expand Up @@ -48,8 +43,9 @@ services:
- grafana_data:/var/lib/grafana
- ./custom.ini:/etc/grafana/grafana.ini
- ./provisioning/datasources:/etc/grafana/provisioning/datasources

prometheus:
image: prom/prometheus
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
Expand All @@ -59,9 +55,18 @@ services:
- '--web.enable-lifecycle'
ports:
- '9090:9090'

redis-exporter:
image: oliver006/redis_exporter
ports:
- 9121:9121
restart: unless-stopped
environment:
REDIS_ADDR: "redis:6379"
links:
- redis
- prometheus
volumes:
db-data:
redis-data:
driver: local
grafana_data: {}
grafana_data: { }
7 changes: 2 additions & 5 deletions prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ scrape_configs:
params:
module: [ logs ]

- job_name: 'redis'
- job_name: redis-exporter
static_configs:
- targets: [ 'redis:6379' ]
metrics_path: /metrics
params:
module: [ logs ]
- targets: [ 'redis-exporter:9121' ]

- job_name: 'prometheus'
static_configs:
Expand Down

0 comments on commit c364f36

Please sign in to comment.