mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +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:
|
networks:
|
||||||
caddy_net: # Crete VPN internal - Need to bind running containers to this network as well
|
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
|
image: prom/prometheus:latest
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
|
||||||
- "9090:9090"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
networks:
|
networks:
|
||||||
@@ -15,12 +13,12 @@ services:
|
|||||||
image: prom/node-exporter:latest
|
image: prom/node-exporter:latest
|
||||||
container_name: node-exporter
|
container_name: node-exporter
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
|
||||||
- "9100:9100"
|
|
||||||
networks:
|
networks:
|
||||||
- monitoring_net
|
- monitoring_net
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
monitoring_net:
|
monitoring_net:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
caddy_net:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ scrape_configs:
|
|||||||
|
|
||||||
- job_name: 'prometheus'
|
- job_name: 'prometheus'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['localhost:9090']
|
- targets: ['prometheus:9090']
|
||||||
|
|
||||||
- job_name: 'node'
|
- job_name: 'node'
|
||||||
static_configs:
|
static_configs:
|
||||||
|
|||||||
Reference in New Issue
Block a user