From dc14578d6ffbb48f53c619720e1e12dc77b723d9 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Thu, 10 Aug 2023 21:40:43 +0200 Subject: [PATCH] vaultwarden : cleanup container-compose.yml + PostgreSQL healthcheck --- podman-vaultwarden/container-compose.yml | 29 ++++-------------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/podman-vaultwarden/container-compose.yml b/podman-vaultwarden/container-compose.yml index 1c66d75..5f103c8 100644 --- a/podman-vaultwarden/container-compose.yml +++ b/podman-vaultwarden/container-compose.yml @@ -2,24 +2,14 @@ version: '3' services: database: container_name: ${db_container_name} - # Don't upgrade PostgreSQL by simply changing the version number - # You need to migrate the Database to the new PostgreSQL version image: ${database_image}:${database_version} - #mem_limit: 256mb # version 2 only - #memswap_limit: 512mb # version 2 only - #read_only: true # not supported in swarm mode please enable along with tmpfs - #tmpfs: - # - /run/postgresql:size=512K - # - /tmp:size=256K - #environment: - # - POSTGRES_USER=vaultwarden - # - POSTGRES_PASSWORD= - # - POSTGRES_DB=vaultwarden volumes: - database:${database_path}:Z - networks: - backend: - #restart: always + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 app: container_name: ${container_name} @@ -28,18 +18,9 @@ services: - data:/data:Z ports: - "127.0.0.1:8090:80" - networks: - backend: depends_on: - ${db_container_name} -# Define networks to allow best isolation -networks: - # Internal network for communication with PostgreSQL/MySQL - backend: - -# Define named volumes so data stays in place volumes: - # Volume for PostgreSQL/MySQL database database: data: