Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add postgres healthcheck to docker-compose.yml (#190)

Leendert de Borstcf454d2bb8bd
diff --git a/docker-compose.yml b/docker-compose.yml
index 012ba0838..220e5cb09 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -39,7 +39,8 @@ services:
env_file:
- .env
depends_on:
- - postgres
+ postgres:
+ condition: service_healthy
environment:
ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"
@@ -55,7 +56,8 @@ services:
env_file:
- .env
depends_on:
- - postgres
+ postgres:
+ condition: service_healthy
environment:
ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"
@@ -71,7 +73,8 @@ services:
env_file:
- .env
depends_on:
- - postgres
+ postgres:
+ condition: service_healthy
environment:
ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"
@@ -84,7 +87,8 @@ services:
env_file:
- .env
depends_on:
- - postgres
+ postgres:
+ condition: service_healthy
environment:
ConnectionStrings__AliasServerDbContext: "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"
@@ -95,3 +99,9 @@ services:
env_file:
- .env
restart: always
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U aliasvault"]
+ interval: 5s
+ timeout: 5s
+ retries: 5
+ start_period: 10s