Add network
This commit is contained in:
@@ -4,4 +4,10 @@ services:
|
|||||||
container_name: adminer
|
container_name: adminer
|
||||||
ports:
|
ports:
|
||||||
- ${PORT}:8080
|
- ${PORT}:8080
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
backend:
|
||||||
|
external: true
|
@@ -2,9 +2,6 @@ services:
|
|||||||
crowdsec:
|
crowdsec:
|
||||||
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
||||||
container_name: crowdsec
|
container_name: crowdsec
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.3
|
|
||||||
environment:
|
environment:
|
||||||
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
||||||
- GID=${GID}
|
- GID=${GID}
|
||||||
@@ -14,6 +11,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
||||||
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
||||||
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
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"]
|
||||||
@@ -30,9 +29,6 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.2
|
|
||||||
environment:
|
environment:
|
||||||
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
||||||
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
||||||
@@ -46,13 +42,13 @@ services:
|
|||||||
- ${HTTP_PORT}:80
|
- ${HTTP_PORT}:80
|
||||||
- ${HTTPS_PORT}:443
|
- ${HTTPS_PORT}:443
|
||||||
- ${HTTPS_PORT}:443/udp
|
- ${HTTPS_PORT}:443/udp
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
frontend:
|
||||||
name: proxy
|
external: true
|
||||||
driver: bridge
|
backend:
|
||||||
ipam:
|
external: true
|
||||||
config:
|
|
||||||
- subnet: 172.30.0.0/16
|
|
||||||
gateway: 172.30.0.1
|
|
||||||
|
@@ -2,8 +2,6 @@ services:
|
|||||||
crowdsec:
|
crowdsec:
|
||||||
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
||||||
container_name: crowdsec
|
container_name: crowdsec
|
||||||
networks:
|
|
||||||
- backend
|
|
||||||
environment:
|
environment:
|
||||||
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
||||||
- GID=${GID}
|
- GID=${GID}
|
||||||
@@ -13,6 +11,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
||||||
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
||||||
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
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"]
|
||||||
@@ -29,9 +29,6 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
networks:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
environment:
|
environment:
|
||||||
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
||||||
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
||||||
@@ -45,6 +42,9 @@ services:
|
|||||||
- ${HTTP_PORT}:80
|
- ${HTTP_PORT}:80
|
||||||
- ${HTTPS_PORT}:443
|
- ${HTTPS_PORT}:443
|
||||||
- ${HTTPS_PORT}:443/udp
|
- ${HTTPS_PORT}:443/udp
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
@@ -4,9 +4,6 @@ services:
|
|||||||
container_name: caddy
|
container_name: caddy
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.2
|
|
||||||
environment:
|
environment:
|
||||||
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
||||||
volumes:
|
volumes:
|
||||||
@@ -19,13 +16,10 @@ services:
|
|||||||
- ${HTTP_PORT}:80
|
- ${HTTP_PORT}:80
|
||||||
- ${HTTPS_PORT}:443
|
- ${HTTPS_PORT}:443
|
||||||
- ${HTTPS_PORT}:443/udp
|
- ${HTTPS_PORT}:443/udp
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
frontend:
|
||||||
name: proxy
|
external: true
|
||||||
driver: bridge
|
|
||||||
ipam:
|
|
||||||
config:
|
|
||||||
- subnet: 172.30.0.0/16
|
|
||||||
gateway: 172.30.0.1
|
|
||||||
|
@@ -4,9 +4,6 @@ services:
|
|||||||
container_name: caddy
|
container_name: caddy
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.2
|
|
||||||
environment:
|
environment:
|
||||||
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
|
||||||
volumes:
|
volumes:
|
||||||
@@ -19,13 +16,10 @@ services:
|
|||||||
- ${HTTP_PORT}:80
|
- ${HTTP_PORT}:80
|
||||||
- ${HTTPS_PORT}:443
|
- ${HTTPS_PORT}:443
|
||||||
- ${HTTPS_PORT}:443/udp
|
- ${HTTPS_PORT}:443/udp
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
frontend:
|
||||||
name: proxy
|
external: true
|
||||||
driver: bridge
|
|
||||||
ipam:
|
|
||||||
config:
|
|
||||||
- subnet: 172.30.0.0/16
|
|
||||||
gateway: 172.30.0.1
|
|
||||||
|
@@ -2,9 +2,6 @@ services:
|
|||||||
crowdsec:
|
crowdsec:
|
||||||
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
image: ghcr.io/crowdsecurity/crowdsec:v1.6.9
|
||||||
container_name: crowdsec
|
container_name: crowdsec
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.3
|
|
||||||
environment:
|
environment:
|
||||||
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
- BOUNCER_KEY_CADDY=${CROWDSEC_API_KEY}
|
||||||
- GID=${GID}
|
- GID=${GID}
|
||||||
@@ -14,6 +11,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
- ${APPDATA_PATH}/caddy/crowdsec-db:/var/lib/crowdsec/data/
|
||||||
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
- ${APPDATA_PATH}/caddy/crowdsec-config:/etc/crowdsec/
|
||||||
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
- ${APPDATA_PATH}/caddy/caddy-logs:/var/log/caddy:ro
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
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"]
|
||||||
@@ -30,9 +29,6 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
networks:
|
|
||||||
proxy:
|
|
||||||
ipv4_address: 172.30.0.2
|
|
||||||
environment:
|
environment:
|
||||||
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
- CROWDSEC_API_KEY=${CROWDSEC_API_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
@@ -45,13 +41,13 @@ services:
|
|||||||
- ${HTTP_PORT}:80
|
- ${HTTP_PORT}:80
|
||||||
- ${HTTPS_PORT}:443
|
- ${HTTPS_PORT}:443
|
||||||
- ${HTTPS_PORT}:443/udp
|
- ${HTTPS_PORT}:443/udp
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
frontend:
|
||||||
name: proxy
|
external: true
|
||||||
driver: bridge
|
backend:
|
||||||
ipam:
|
external: true
|
||||||
config:
|
|
||||||
- subnet: 172.30.0.0/16
|
|
||||||
gateway: 172.30.0.1
|
|
||||||
|
@@ -10,4 +10,10 @@ services:
|
|||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- ${SERVER_PORT}:3000
|
- ${SERVER_PORT}:3000
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
frontend:
|
||||||
|
external: true
|
@@ -13,6 +13,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/gitea-mirror/data:/app/data
|
- ${APPDATA_PATH}/gitea-mirror/data:/app/data
|
||||||
ports:
|
ports:
|
||||||
- ${PORT}:4321
|
- ${PORT}:4321
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--no-verbose", "--tries=3", "--spider", "http://localhost:4321/api/health"]
|
test: ["CMD", "wget", "--no-verbose", "--tries=3", "--spider", "http://localhost:4321/api/health"]
|
||||||
@@ -20,3 +22,7 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 15s
|
start_period: 15s
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
|
external: true
|
||||||
|
@@ -12,6 +12,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/gitea/db:/var/lib/mysql
|
- ${APPDATA_PATH}/gitea/db:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
- ${DB_PORT}:3306
|
- ${DB_PORT}:3306
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||||
@@ -41,4 +43,13 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${SERVER_PORT}:3000
|
- ${SERVER_PORT}:3000
|
||||||
- ${SSH_PORT}:22
|
- ${SSH_PORT}:22
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
frontend:
|
||||||
|
external: true
|
||||||
|
backend:
|
||||||
|
external: true
|
||||||
|
@@ -10,6 +10,8 @@ services:
|
|||||||
- ${APPDATA_PATH}/gitea/db:/var/lib/postgresql/data
|
- ${APPDATA_PATH}/gitea/db:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- ${DB_PORT}:5432
|
- ${DB_PORT}:5432
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
||||||
@@ -39,4 +41,13 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${SERVER_PORT}:3000
|
- ${SERVER_PORT}:3000
|
||||||
- ${SSH_PORT}:22
|
- ${SSH_PORT}:22
|
||||||
|
networks:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
frontend:
|
||||||
|
external: true
|
||||||
|
backend:
|
||||||
|
external: true
|
||||||
|
Reference in New Issue
Block a user