Commit 79e2cb011cc16892f07ea4e219ae3487d38e5d7d
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 | 10 | deploy: |
11 | 11 | restart_policy: |
12 | 12 | condition: on-failure |
13 | - delay: 5s | |
14 | - max_attempts: 3 | |
15 | - window: 120s | |
13 | + max_attempts: 5 | |
16 | 14 | resources: |
17 | 15 | limits: |
18 | 16 | cpus: '0.5' |
19 | 17 | memory: 1GB |
18 | + #pids: 1 | |
20 | 19 | container_name: pyros-db |
21 | 20 | environment: |
22 | 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 | 41 | deploy: |
43 | 42 | restart_policy: |
44 | 43 | condition: on-failure |
45 | - delay: 5s | |
46 | - max_attempts: 3 | |
47 | - window: 120s | |
44 | + max_attempts: 5 | |
48 | 45 | resources: |
49 | 46 | limits: |
50 | 47 | cpus: '1' |
51 | 48 | memory: 1GB |
49 | + #pids: 1 | |
52 | 50 | ports: |
53 | 51 | - "6379:6379" |
52 | + healthcheck: | |
53 | + test: ["CMD", "redis-cli","ping"] | |
54 | + timeout: 10s | |
55 | + interval: 5s | |
56 | + retries: 20 | |
54 | 57 | # networks: |
55 | 58 | # pyros-network: |
56 | 59 | # ipv4_address: 172.19.0.5 |
... | ... | @@ -61,13 +64,12 @@ services: |
61 | 64 | deploy: |
62 | 65 | restart_policy: |
63 | 66 | condition: on-failure |
64 | - delay: 5s | |
65 | - max_attempts: 3 | |
66 | - window: 120s | |
67 | + max_attempts: 5 | |
67 | 68 | resources: |
68 | 69 | limits: |
69 | 70 | cpus: '1' |
70 | 71 | memory: 8GB |
72 | + #pids: 1 | |
71 | 73 | # path to the Dockerfile of this image |
72 | 74 | environment: |
73 | 75 | # environment variables only for Docker |
... | ... | @@ -112,6 +114,13 @@ services: |
112 | 114 | # ipv4_address: 172.19.0.3 |
113 | 115 | #ipv4_address: "${IP_PYROS_USER}" |
114 | 116 | restart: always |
117 | + healthcheck: | |
118 | + test: ["CMD", "python3","-V"] | |
119 | + timeout: 10s | |
120 | + interval: 5s | |
121 | + retries: 20 | |
122 | + | |
123 | + | |
115 | 124 | phpmyadmin: |
116 | 125 | image: phpmyadmin/phpmyadmin |
117 | 126 | container_name: pyros-pma |
... | ... | @@ -121,6 +130,16 @@ services: |
121 | 130 | PMA_HOST: db |
122 | 131 | PMA_PORT: 3306 |
123 | 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 | 143 | env_file: |
125 | 144 | - .env |
126 | 145 | restart: always |
... | ... | @@ -129,6 +148,11 @@ services: |
129 | 148 | # ipv4_address: 172.19.0.4 |
130 | 149 | ports: |
131 | 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 | ... | ... |