Add network for caddy

This commit is contained in:
2025-07-14 22:57:49 +05:30
parent a1be0f3ae7
commit 60edd88542
2 changed files with 38 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ services:
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files - ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro # Read-only log access - ${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 # Health check configuration
healthcheck: healthcheck:
test: ["CMD-SHELL", "wget --spider --quiet --tries=1 --timeout=5 http://localhost:8080/health > /dev/null 2>&1 || exit 1"] 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 - ${HTTP_PORT}:80 # HTTP traffic
- ${HTTPS_PORT}:443 # HTTPS traffic - ${HTTPS_PORT}:443 # HTTPS traffic
- ${HTTPS_PORT}:443/udp # QUIC/HTTP3 support - ${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

View File

@@ -19,6 +19,11 @@ services:
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files - ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/ # Configuration files
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro # Read-only log access - ${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 # Health check configuration
healthcheck: healthcheck:
test: ["CMD-SHELL", "wget --spider --quiet --tries=1 --timeout=5 http://localhost:8080/health > /dev/null 2>&1 || exit 1"] 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 - ${HTTP_PORT}:80 # HTTP traffic
- ${HTTPS_PORT}:443 # HTTPS traffic - ${HTTPS_PORT}:443 # HTTPS traffic
- ${HTTPS_PORT}:443/udp # QUIC/HTTP3 support - ${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