Skip to content

Commit

Permalink
Localhost only, take II
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Dec 1, 2020
1 parent ec15c3d commit 16fbb5b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .env

This file was deleted.

6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ nodes using Prometheus and presents them in a browser-based Grafana GUI.

By default Prometheus and Grafana will only bind to localhost (127.0.0.1), in
order to protect you from accidentally exposing them to the public internet. If
you would like to change this you can use the provided `public.env` file:

```
docker-compose --env-file public.env up --build
```
you would like to change this you must edit the `http_addr` in `grafana.ini`.

## Maintenance and Contributing

Expand Down
8 changes: 2 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ services:
- type: bind
source: ./scrape-targets
target: /prometheus/targets
ports:
- ${PROM_LISTEN_ADDRESS}:9090:9090
restart: always
network_mode: bridge
network_mode: host
grafana:
build:
context: grafana
volumes:
- grafana-data:/var/lib/grafana
ports:
- ${GRAFANA_LISTEN_ADDRESS}:3000:3000
restart: always
network_mode: bridge
network_mode: host

volumes:
grafana-data:
Expand Down
2 changes: 1 addition & 1 deletion grafana/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
;protocol = http

# The ip address to bind to, empty will bind to all interfaces
;http_addr =
http_addr = 127.0.0.1

# The http port to use
;http_port = 3000
Expand Down
6 changes: 6 additions & 0 deletions prometheus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
FROM prom/prometheus
ADD prometheus.yml /etc/prometheus/
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--web.listen-address=127.0.0.1:9090", \
"--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles" ]
2 changes: 0 additions & 2 deletions public.env

This file was deleted.

0 comments on commit 16fbb5b

Please sign in to comment.