From 79e2cb011cc16892f07ea4e219ae3487d38e5d7d Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Thu, 20 Jul 2023 14:14:54 +0200 Subject: [PATCH] fix docker warnings --- docker/docker-compose.yml | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index d7f1a7d..d01134a 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,13 +10,12 @@ services: deploy: restart_policy: condition: on-failure - delay: 5s - max_attempts: 3 - window: 120s + max_attempts: 5 resources: limits: cpus: '0.5' memory: 1GB + #pids: 1 container_name: pyros-db environment: # note : as db is an image of mysql, this root password will be set on the first installation on the image, if the value is changed, it will not be updated in the database @@ -42,15 +41,19 @@ services: deploy: restart_policy: condition: on-failure - delay: 5s - max_attempts: 3 - window: 120s + max_attempts: 5 resources: limits: cpus: '1' memory: 1GB + #pids: 1 ports: - "6379:6379" + healthcheck: + test: ["CMD", "redis-cli","ping"] + timeout: 10s + interval: 5s + retries: 20 # networks: # pyros-network: # ipv4_address: 172.19.0.5 @@ -61,13 +64,12 @@ services: deploy: restart_policy: condition: on-failure - delay: 5s - max_attempts: 3 - window: 120s + max_attempts: 5 resources: limits: cpus: '1' memory: 8GB + #pids: 1 # path to the Dockerfile of this image environment: # environment variables only for Docker @@ -112,6 +114,13 @@ services: # ipv4_address: 172.19.0.3 #ipv4_address: "${IP_PYROS_USER}" restart: always + healthcheck: + test: ["CMD", "python3","-V"] + timeout: 10s + interval: 5s + retries: 20 + + phpmyadmin: image: phpmyadmin/phpmyadmin container_name: pyros-pma @@ -121,6 +130,16 @@ services: PMA_HOST: db PMA_PORT: 3306 PMA_ARBITRARY: 1 + deploy: + restart_policy: + condition: on-failure + max_attempts: 5 + resources: + limits: + cpus: '1' + memory: 1GB + #pids: 1 + env_file: - .env restart: always @@ -129,6 +148,11 @@ services: # ipv4_address: 172.19.0.4 ports: - "${PHPMYADMIN_PORT:-8081}:80" + healthcheck: + test: ["CMD", 'mysqladmin', 'ping', '-h', 'db', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ] + timeout: 10s + interval: 5s + retries: 20 -- libgit2 0.21.2