From 60edd88542de7218226dc2ed1ada1b799d37e943 Mon Sep 17 00:00:00 2001 From: ryuupendragon Date: Mon, 14 Jul 2025 22:57:49 +0530 Subject: [PATCH] Add network for caddy --- .../docker-compose.yml | 19 +++++++++++++++++++ caddy-crowdsec/docker-compose.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/caddy-cloudflare-ddns-crowdsec/docker-compose.yml b/caddy-cloudflare-ddns-crowdsec/docker-compose.yml index 6f45e0d..1641f15 100644 --- a/caddy-cloudflare-ddns-crowdsec/docker-compose.yml +++ b/caddy-cloudflare-ddns-crowdsec/docker-compose.yml @@ -19,6 +19,11 @@ services: - ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files - ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro # Read-only log access + # Networks + networks: + proxy: + ipv4_address: 172.30.0.3 + # Health check configuration healthcheck: test: ["CMD-SHELL", "wget --spider --quiet --tries=1 --timeout=5 http://localhost:8080/health > /dev/null 2>&1 || exit 1"] @@ -60,3 +65,17 @@ services: - ${HTTP_PORT}:80 # HTTP traffic - ${HTTPS_PORT}:443 # HTTPS traffic - ${HTTPS_PORT}:443/udp # QUIC/HTTP3 support + + # Networks + networks: + proxy: + ipv4_address: 172.30.0.2 + +networks: + proxy: + name: proxy + driver: bridge + ipam: + config: + - subnet: 172.30.0.0/16 + gateway: 172.30.0.1 diff --git a/caddy-crowdsec/docker-compose.yml b/caddy-crowdsec/docker-compose.yml index 25140ce..eb9218a 100644 --- a/caddy-crowdsec/docker-compose.yml +++ b/caddy-crowdsec/docker-compose.yml @@ -19,6 +19,11 @@ services: - ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files - ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro # Read-only log access + # Networks + networks: + proxy: + ipv4_address: 172.30.0.3 + # Health check configuration healthcheck: test: ["CMD-SHELL", "wget --spider --quiet --tries=1 --timeout=5 http://localhost:8080/health > /dev/null 2>&1 || exit 1"] @@ -59,3 +64,17 @@ services: - ${HTTP_PORT}:80 # HTTP traffic - ${HTTPS_PORT}:443 # HTTPS traffic - ${HTTPS_PORT}:443/udp # QUIC/HTTP3 support + + # Networks + networks: + proxy: + ipv4_address: 172.30.0.2 + +networks: + proxy: + name: proxy + driver: bridge + ipam: + config: + - subnet: 172.30.0.0/16 + gateway: 172.30.0.1