mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Added husky pre-commit hook and also added health check on docker_compose service
This commit is contained in:
parent
0a049e23ef
commit
26ec5f6653
4 changed files with 30 additions and 2 deletions
|
|
@ -8,6 +8,13 @@ services:
|
|||
- .:/usr/learnhouse
|
||||
environment:
|
||||
- LEARNHOUSE_COOKIE_DOMAIN=.localhost
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
mongo:
|
||||
condition: service_healthy
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: always
|
||||
|
|
@ -17,11 +24,18 @@ services:
|
|||
- POSTGRES_USER=learnhouse
|
||||
- POSTGRES_PASSWORD=learnhouse
|
||||
- POSTGRES_DB=learnhouse
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
redis:
|
||||
image: redis:7.2.3
|
||||
restart: always
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
mongo:
|
||||
image: mongo:5.0
|
||||
restart: always
|
||||
|
|
@ -30,3 +44,5 @@ services:
|
|||
environment:
|
||||
- MONGO_INITDB_ROOT_USERNAME=learnhouse
|
||||
- MONGO_INITDB_ROOT_PASSWORD=learnhouse
|
||||
healthcheck:
|
||||
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
|
||||
Loading…
Add table
Add a link
Reference in a new issue