Commit 79e2cb011cc16892f07ea4e219ae3487d38e5d7d

Authored by Alexis Koralewski
1 parent 1f50bd80
Exists in dev

fix docker warnings

Showing 1 changed file with 33 additions and 9 deletions   Show diff stats
docker/docker-compose.yml
@@ -10,13 +10,12 @@ services: @@ -10,13 +10,12 @@ services:
10 deploy: 10 deploy:
11 restart_policy: 11 restart_policy:
12 condition: on-failure 12 condition: on-failure
13 - delay: 5s  
14 - max_attempts: 3  
15 - window: 120s 13 + max_attempts: 5
16 resources: 14 resources:
17 limits: 15 limits:
18 cpus: '0.5' 16 cpus: '0.5'
19 memory: 1GB 17 memory: 1GB
  18 + #pids: 1
20 container_name: pyros-db 19 container_name: pyros-db
21 environment: 20 environment:
22 # 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 21 # 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: @@ -42,15 +41,19 @@ services:
42 deploy: 41 deploy:
43 restart_policy: 42 restart_policy:
44 condition: on-failure 43 condition: on-failure
45 - delay: 5s  
46 - max_attempts: 3  
47 - window: 120s 44 + max_attempts: 5
48 resources: 45 resources:
49 limits: 46 limits:
50 cpus: '1' 47 cpus: '1'
51 memory: 1GB 48 memory: 1GB
  49 + #pids: 1
52 ports: 50 ports:
53 - "6379:6379" 51 - "6379:6379"
  52 + healthcheck:
  53 + test: ["CMD", "redis-cli","ping"]
  54 + timeout: 10s
  55 + interval: 5s
  56 + retries: 20
54 # networks: 57 # networks:
55 # pyros-network: 58 # pyros-network:
56 # ipv4_address: 172.19.0.5 59 # ipv4_address: 172.19.0.5
@@ -61,13 +64,12 @@ services: @@ -61,13 +64,12 @@ services:
61 deploy: 64 deploy:
62 restart_policy: 65 restart_policy:
63 condition: on-failure 66 condition: on-failure
64 - delay: 5s  
65 - max_attempts: 3  
66 - window: 120s 67 + max_attempts: 5
67 resources: 68 resources:
68 limits: 69 limits:
69 cpus: '1' 70 cpus: '1'
70 memory: 8GB 71 memory: 8GB
  72 + #pids: 1
71 # path to the Dockerfile of this image 73 # path to the Dockerfile of this image
72 environment: 74 environment:
73 # environment variables only for Docker 75 # environment variables only for Docker
@@ -112,6 +114,13 @@ services: @@ -112,6 +114,13 @@ services:
112 # ipv4_address: 172.19.0.3 114 # ipv4_address: 172.19.0.3
113 #ipv4_address: "${IP_PYROS_USER}" 115 #ipv4_address: "${IP_PYROS_USER}"
114 restart: always 116 restart: always
  117 + healthcheck:
  118 + test: ["CMD", "python3","-V"]
  119 + timeout: 10s
  120 + interval: 5s
  121 + retries: 20
  122 +
  123 +
115 phpmyadmin: 124 phpmyadmin:
116 image: phpmyadmin/phpmyadmin 125 image: phpmyadmin/phpmyadmin
117 container_name: pyros-pma 126 container_name: pyros-pma
@@ -121,6 +130,16 @@ services: @@ -121,6 +130,16 @@ services:
121 PMA_HOST: db 130 PMA_HOST: db
122 PMA_PORT: 3306 131 PMA_PORT: 3306
123 PMA_ARBITRARY: 1 132 PMA_ARBITRARY: 1
  133 + deploy:
  134 + restart_policy:
  135 + condition: on-failure
  136 + max_attempts: 5
  137 + resources:
  138 + limits:
  139 + cpus: '1'
  140 + memory: 1GB
  141 + #pids: 1
  142 +
124 env_file: 143 env_file:
125 - .env 144 - .env
126 restart: always 145 restart: always
@@ -129,6 +148,11 @@ services: @@ -129,6 +148,11 @@ services:
129 # ipv4_address: 172.19.0.4 148 # ipv4_address: 172.19.0.4
130 ports: 149 ports:
131 - "${PHPMYADMIN_PORT:-8081}:80" 150 - "${PHPMYADMIN_PORT:-8081}:80"
  151 + healthcheck:
  152 + test: ["CMD", 'mysqladmin', 'ping', '-h', 'db', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ]
  153 + timeout: 10s
  154 + interval: 5s
  155 + retries: 20
132 156
133 157
134 158