Add healthcheck to crowdsec and komodo

This commit is contained in:
2025-06-28 23:31:45 +05:30
parent c2d5a5e7b2
commit f09efb6cee
2 changed files with 16 additions and 19 deletions

View File

@@ -11,6 +11,12 @@ services:
volumes:
- ./postgres:/var/lib/postgresql/data
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:
image: ghcr.io/ferretdb/ferretdb:2.3.1
@@ -18,7 +24,8 @@ services:
labels:
komodo.skip:
depends_on:
- komodo_postgres
komodo_postgres:
condition: service_healthy
environment:
FERRETDB_POSTGRESQL_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@komodo_postgres:5432/postgres
volumes:
@@ -31,7 +38,8 @@ services:
labels:
komodo.skip:
depends_on:
- komodo_ferretdb
komodo_ferretdb:
condition: service_healthy
environment:
KOMODO_DATABASE_ADDRESS: komodo_ferretdb:27017
KOMODO_DATABASE_USERNAME: ${POSTGRES_USER}
@@ -42,20 +50,3 @@ services:
ports:
- 9120:9120
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