Add healthcheck to crowdsec and komodo
This commit is contained in:
@@ -15,6 +15,12 @@ services:
|
|||||||
- ${APPDATA_PATH}/caddy-crowdsec/crowdsec-config:/etc/crowdsec/
|
- ${APPDATA_PATH}/caddy-crowdsec/crowdsec-config:/etc/crowdsec/
|
||||||
- ${APPDATA_PATH}/caddy-crowdsec/caddy-logs:/var/log/caddy:ro
|
- ${APPDATA_PATH}/caddy-crowdsec/caddy-logs:/var/log/caddy:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget --spider --quiet --tries=1 --timeout=5 http://localhost:8080/health > /dev/null 2>&1 || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
image: ryuupendragon/caddy-crowdsec:2.10.0
|
image: ryuupendragon/caddy-crowdsec:2.10.0
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./postgres:/var/lib/postgresql/data
|
- ./postgres:/var/lib/postgresql/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -d postgres -U ${POSTGRES_USER}"]
|
||||||
|
start_period: 20s
|
||||||
|
interval: 30s
|
||||||
|
retries: 5
|
||||||
|
timeout: 5s
|
||||||
|
|
||||||
komodo_ferretdb:
|
komodo_ferretdb:
|
||||||
image: ghcr.io/ferretdb/ferretdb:2.3.1
|
image: ghcr.io/ferretdb/ferretdb:2.3.1
|
||||||
@@ -18,7 +24,8 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
komodo.skip:
|
komodo.skip:
|
||||||
depends_on:
|
depends_on:
|
||||||
- komodo_postgres
|
komodo_postgres:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
FERRETDB_POSTGRESQL_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@komodo_postgres:5432/postgres
|
FERRETDB_POSTGRESQL_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@komodo_postgres:5432/postgres
|
||||||
volumes:
|
volumes:
|
||||||
@@ -31,7 +38,8 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
komodo.skip:
|
komodo.skip:
|
||||||
depends_on:
|
depends_on:
|
||||||
- komodo_ferretdb
|
komodo_ferretdb:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
KOMODO_DATABASE_ADDRESS: komodo_ferretdb:27017
|
KOMODO_DATABASE_ADDRESS: komodo_ferretdb:27017
|
||||||
KOMODO_DATABASE_USERNAME: ${POSTGRES_USER}
|
KOMODO_DATABASE_USERNAME: ${POSTGRES_USER}
|
||||||
@@ -42,20 +50,3 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9120:9120
|
- 9120:9120
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
komodo_periphery:
|
|
||||||
image: ghcr.io/moghtech/komodo-periphery:1.18.4
|
|
||||||
container_name: komodo_periphery
|
|
||||||
labels:
|
|
||||||
komodo.skip:
|
|
||||||
environment:
|
|
||||||
- PERIPHERY_ROOT_DIRECTORY=${PERIPHERY_ROOT_DIRECTORY}
|
|
||||||
- PERIPHERY_PASSKEYS=${PERIPHERY_PASSKEYS}
|
|
||||||
- PERIPHERY_SSL_ENABLED=${PERIPHERY_SSL_ENABLED}
|
|
||||||
- PERIPHERY_DISABLE_TERMINALS=${PERIPHERY_DISABLE_TERMINALS}
|
|
||||||
- PERIPHERY_INCLUDE_DISK_MOUNTS=${PERIPHERY_INCLUDE_DISK_MOUNTS}
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- /proc:/proc
|
|
||||||
- ${PERIPHERY_ROOT_DIRECTORY}:${PERIPHERY_ROOT_DIRECTORY}
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|||||||
Reference in New Issue
Block a user