Migrate to using compose plugin and healthchecks.

This commit migrates docs and tests to use docker-commpose-plugin
instead of the old docker-compose package. This allows us to use
new APIs like healthchecks for containers.
This commit is contained in:
Abhilash Raj
2024-10-04 18:37:51 +05:30
parent 2644f1ac37
commit 706bec79b4
3 changed files with 17 additions and 10 deletions

View File

@@ -12,7 +12,8 @@ services:
links:
- database:database
depends_on:
- database
database:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://mailman:mailmanpass@database/mailmandb
- DATABASE_TYPE=postgres
@@ -30,7 +31,8 @@ services:
hostname: mailman-web
restart: unless-stopped
depends_on:
- database
database:
condition: service_healthy
links:
- mailman-core:mailman-core
- database:database
@@ -54,6 +56,11 @@ services:
image: postgres:12-alpine
volumes:
- /opt/mailman/database:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready --dbname mailmandb --username mailman"]
interval: 10s
timeout: 5s
retries: 5
networks:
mailman: