From 23ad464eadd7f80b41688f05b2b43d1c5f5acf35 Mon Sep 17 00:00:00 2001 From: ruslandoga Date: Wed, 17 Jul 2024 23:57:13 +0700 Subject: [PATCH] Update compose.example.yml --- compose.example.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/compose.example.yml b/compose.example.yml index 65a881f..2156939 100644 --- a/compose.example.yml +++ b/compose.example.yml @@ -8,6 +8,10 @@ services: - db-data:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=postgres + healthcheck: + test: pg_isready + start_interval: 2s + start_period: 1m plausible_events_db: image: clickhouse/clickhouse-server:24.3.3.102-alpine @@ -17,6 +21,10 @@ services: - event-logs:/var/log/clickhouse-server - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro + healthcheck: + test: wget --no-verbose --tries=1 --spider http://127.0.0.1:8123/ping || exit 1 + start_interval: 2s + start_period: 1m ulimits: nofile: soft: 262144 @@ -26,6 +34,10 @@ services: image: ghcr.io/plausible/community-edition:v2.1.2 restart: always command: sh -c "/entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run" + healthcheck: + test: wget --no-verbose --tries=1 --spider http://127.0.0.1:8000 || exit 1 + start_interval: 2s + start_period: 1m depends_on: - plausible_db - plausible_events_db