Skip to content

Commit

Permalink
add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarei committed Dec 13, 2023
1 parent bf003a0 commit 4c7f176
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,10 @@ services:
expose:
- "3000"
depends_on:
- db
- es
db:
condition: service_healthy
es:
condition: service_healthy
volumes:
- ./config.yml:/app/config.yml
- app-storage:/app/storage
Expand Down Expand Up @@ -399,6 +401,11 @@ services:
- "3306"
volumes:
- db:/var/lib/mysql
healthcheck:
test: mysql --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD --execute "SHOW DATABASES;"
interval: 1s
timeout: 10s
retries: 60

es:
image: ghcr.io/traptitech/es-with-sudachi:8.8.1-3.1.0
Expand All @@ -413,6 +420,11 @@ services:
volumes:
- ./es_jvm.options:/usr/share/elasticsearch/config/jvm.options.d/es_jvm.options
- es:/usr/share/elasticsearch/data
healthcheck:
test: curl -s http://localhost:9200 >/dev/null || exit 1
interval: 1s
timeout: 10s
retries: 60

volumes:
caddy-data:
Expand Down

0 comments on commit 4c7f176

Please sign in to comment.