Skip to content

Commit

Permalink
fix(docker): use 3s intervals for all healthchecks
Browse files Browse the repository at this point in the history
This'll speed up the docker development and deployment
processes significantly.

Signed-off-by: Kevin Morris <kevr@0cost.org>
  • Loading branch information
kevr committed Nov 3, 2021
1 parent 16e6fa2 commit e4a5b7f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ services:
command: /docker/scripts/run-memcached.sh
healthcheck:
test: "bash /docker/health/memcached.sh"

interval: 3s

redis:
image: aurweb:latest
init: true
entrypoint: /docker/redis-entrypoint.sh
command: /docker/scripts/run-redis.sh
healthcheck:
test: "bash /docker/health/redis.sh"
interval: 3s
ports:
- "16379:6379"

Expand All @@ -62,6 +64,7 @@ services:
- mariadb_data:/var/lib/mysql
healthcheck:
test: "bash /docker/health/mariadb.sh"
interval: 3s

mariadb_init:
image: aurweb:latest
Expand All @@ -85,6 +88,7 @@ services:
- "2222:2222"
healthcheck:
test: "bash /docker/health/sshd.sh"
interval: 3s
depends_on:
mariadb_init:
condition: service_started
Expand All @@ -100,6 +104,7 @@ services:
command: /docker/scripts/run-smartgit.sh
healthcheck:
test: "bash /docker/health/smartgit.sh"
interval: 3s

cgit-php:
image: aurweb:latest
Expand All @@ -111,6 +116,7 @@ services:
command: /docker/scripts/run-cgit.sh 3000
healthcheck:
test: "bash /docker/health/cgit.sh 3000"
interval: 3s
depends_on:
git:
condition: service_healthy
Expand All @@ -129,6 +135,7 @@ services:
command: /docker/scripts/run-cgit.sh 3000
healthcheck:
test: "bash /docker/health/cgit.sh 3000"
interval: 3s
depends_on:
git:
condition: service_healthy
Expand All @@ -148,6 +155,7 @@ services:
command: /docker/scripts/run-php.sh
healthcheck:
test: "bash /docker/health/php.sh"
interval: 3s
depends_on:
ca:
condition: service_started
Expand All @@ -174,6 +182,7 @@ services:
command: /docker/scripts/run-fastapi.sh "${FASTAPI_BACKEND}"
healthcheck:
test: "bash /docker/health/fastapi.sh ${FASTAPI_BACKEND}"
interval: 3s
depends_on:
ca:
condition: service_started
Expand All @@ -198,6 +207,7 @@ services:
- "8444:8444" # FastAPI
healthcheck:
test: "bash /docker/health/nginx.sh"
interval: 3s
depends_on:
cgit-php:
condition: service_healthy
Expand Down

0 comments on commit e4a5b7f

Please sign in to comment.