mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
Add caddy_net for allowing VPN access to containers from the WebServer
This commit is contained in:
@@ -6,5 +6,5 @@ domain.com {
|
|||||||
|
|
||||||
# Reverse proxy
|
# Reverse proxy
|
||||||
ssl.test.benitez.ar {
|
ssl.test.benitez.ar {
|
||||||
reverse_proxy * http://localhost:9090
|
reverse_proxy * http://{CONTAINER_NAME}:{CONTAINER_PORT}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ services:
|
|||||||
caddy:
|
caddy:
|
||||||
image: caddy:latest
|
image: caddy:latest
|
||||||
container_name: caddy
|
container_name: caddy
|
||||||
network_mode: "host" # Allow access to local networks (EX: Backend running on port 3000)
|
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
@@ -12,3 +11,9 @@ services:
|
|||||||
- ./caddy_data:/data
|
- ./caddy_data:/data
|
||||||
- ./caddy_config:/config
|
- ./caddy_config:/config
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- caddy_net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
caddy_net: # Crete VPN internal - Need to bind running containers to this network as well
|
||||||
|
driver: bridge
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
networks:
|
networks:
|
||||||
- monitoring_net
|
- monitoring_net
|
||||||
|
- caddy_net
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
networks:
|
networks:
|
||||||
- monitoring_net
|
- monitoring_net
|
||||||
|
- caddy_net
|
||||||
|
|
||||||
node_exporter:
|
node_exporter:
|
||||||
image: prom/node-exporter:latest
|
image: prom/node-exporter:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user