diff --git a/stacks/gitea.yml b/stacks/gitea.yml index 6781723..cba1f56 100644 --- a/stacks/gitea.yml +++ b/stacks/gitea.yml @@ -1,4 +1,4 @@ -version: '3' +version: '3.4' services: app: @@ -52,7 +52,7 @@ services: db: image: 'postgres:14.1-alpine' - + deploy: mode: 'replicated' replicas: 1 @@ -60,6 +60,13 @@ services: constraints: - 'node.labels.class==gitea' + healthcheck: + test: pg_isready + interval: 30s + timeout: 5s + retries: 3 + start_period: 15s + environment: - 'POSTGRES_USER=gitea' - 'POSTGRES_PASSWORD=gitea' diff --git a/stacks/matrix.yml b/stacks/matrix.yml index 2efe251..3a12c01 100644 --- a/stacks/matrix.yml +++ b/stacks/matrix.yml @@ -59,6 +59,13 @@ services: placement: constraints: - 'node.labels.class==matrix' + + healthcheck: + test: pg_isready + interval: 30s + timeout: 5s + retries: 3 + start_period: 15s environment: - 'POSTGRES_DB=matrix_fb' @@ -109,6 +116,13 @@ services: constraints: - 'node.labels.class==matrix' + healthcheck: + test: pg_isready + interval: 30s + timeout: 5s + retries: 3 + start_period: 15s + environment: - 'POSTGRES_DB=matrix_signal' - 'POSTGRES_USER=matrix_signal'