mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-13 21:06:16 +00:00
Modified docker definitions to use internal caddy_net
Exposing ports on docker-compose bypasses UFW definitions, which is a high risk, so we use internal networks only to connect between containers
This commit is contained in:
@@ -16,4 +16,4 @@ services:
|
||||
|
||||
networks:
|
||||
caddy_net: # Crete VPN internal - Need to bind running containers to this network as well
|
||||
driver: bridge
|
||||
external: true # caddy_net must be created before spinning up containers
|
||||
|
||||
@@ -3,8 +3,6 @@ services:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: always
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
networks:
|
||||
@@ -15,12 +13,12 @@ services:
|
||||
image: prom/node-exporter:latest
|
||||
container_name: node-exporter
|
||||
restart: always
|
||||
ports:
|
||||
- "9100:9100"
|
||||
networks:
|
||||
- monitoring_net
|
||||
|
||||
networks:
|
||||
monitoring_net:
|
||||
driver: bridge
|
||||
caddy_net:
|
||||
external: true
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ scrape_configs:
|
||||
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
- targets: ['prometheus:9090']
|
||||
|
||||
- job_name: 'node'
|
||||
static_configs:
|
||||
|
||||
Reference in New Issue
Block a user