Skip to content

Commit

Permalink
mrjones try and hack host.docker.internal to work
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones-plip committed Apr 30, 2024
1 parent ee24210 commit 034b515
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions development/host.docker.internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# file to add shared host of host.docker.internal to all instances running in dev
# thanks https://stackoverflow.com/a/70725882
# and thanks https://nickjanetakis.com/blog/connect-to-a-service-running-on-your-docker-host-from-a-container

services:
prometheus:
extra_hosts:
- "host.docker.internal:host-gateway"

grafana:
extra_hosts:
- "host.docker.internal:host-gateway"

json-exporter:
extra_hosts:
- "host.docker.internal:host-gateway"

sql_exporter:
extra_hosts:
- "host.docker.internal:host-gateway"
2 changes: 2 additions & 0 deletions development/kill.start.ips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ docker compose \
-f docker-compose.yml \
-f exporters/postgres/compose.yml \
-f development/fake-cht/docker-compose.fake-cht.yml \
-f development/host.docker.internal.yml \
kill

echo;echo "Starting...";echo
docker compose \
-f docker-compose.yml \
-f exporters/postgres/compose.yml \
-f development/fake-cht/docker-compose.fake-cht.yml \
-f development/host.docker.internal.yml \
up -d \
--remove-orphans

Expand Down

0 comments on commit 034b515

Please sign in to comment.