diff --git a/roles/docker-gitea/templates/docker-compose.yml.j2 b/roles/docker-gitea/templates/docker-compose.yml.j2 index 03f3e46f..884a5921 100644 --- a/roles/docker-gitea/templates/docker-compose.yml.j2 +++ b/roles/docker-gitea/templates/docker-compose.yml.j2 @@ -30,6 +30,11 @@ services: - data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"] + interval: 1m + timeout: 10s + retries: 3 {% include 'templates/docker-container-networks.yml.j2' %} {% include 'templates/docker-container-depends-on-just-database.yml.j2' %} diff --git a/roles/docker-nextcloud/templates/docker-compose.yml.j2 b/roles/docker-nextcloud/templates/docker-compose.yml.j2 index 0844581e..21a62571 100644 --- a/roles/docker-nextcloud/templates/docker-compose.yml.j2 +++ b/roles/docker-nextcloud/templates/docker-compose.yml.j2 @@ -32,6 +32,11 @@ services: - "{{path_docker_volumes}}nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro" volumes_from: - application + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80/"] + interval: 1m + timeout: 10s + retries: 3 {% include 'templates/docker-container-networks.yml.j2' %} cron: diff --git a/roles/docker-wordpress/templates/docker-compose.yml.j2 b/roles/docker-wordpress/templates/docker-compose.yml.j2 index cff1f1b2..35ed9229 100644 --- a/roles/docker-wordpress/templates/docker-compose.yml.j2 +++ b/roles/docker-wordpress/templates/docker-compose.yml.j2 @@ -17,6 +17,11 @@ services: WORDPRESS_DB_NAME: "{{database_databasename}}" volumes: - data:/var/www/html + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80/"] + interval: 1m + timeout: 10s + retries: 3 {% include 'templates/docker-container-depends-on-just-database.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %} diff --git a/roles/docker-yourls/templates/docker-compose.yml.j2 b/roles/docker-yourls/templates/docker-compose.yml.j2 index 38ae2e87..3dbb7756 100644 --- a/roles/docker-yourls/templates/docker-compose.yml.j2 +++ b/roles/docker-yourls/templates/docker-compose.yml.j2 @@ -19,6 +19,11 @@ services: YOURLS_SITE: "https://{{domain}}" YOURLS_USER: "{{yourls_user}}" YOURLS_PASS: "{{yourls_user_password}}" + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1/admin/"] + interval: 1m + timeout: 10s + retries: 3 {% include 'templates/docker-container-depends-on-just-database.yml.j2' %} {% include 'templates/docker-container-networks.yml.j2' %}