mastodon: add healthchecks
This commit is contained in:
parent
b888dec4d5
commit
6ff5ffdcbf
1 changed files with 10 additions and 0 deletions
|
@ -63,6 +63,8 @@ services:
|
|||
stop_signal: SIGINT
|
||||
networks:
|
||||
backend:
|
||||
healthcheck:
|
||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||
volumes:
|
||||
- {{ mastodon_database_location }}:/var/lib/postgresql/data
|
||||
restart: always
|
||||
|
@ -73,6 +75,8 @@ services:
|
|||
memswap_limit: 768mb
|
||||
networks:
|
||||
backend:
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
volumes:
|
||||
- {{ mastodon_redis_location }}:/data
|
||||
restart: always
|
||||
|
@ -123,6 +127,8 @@ services:
|
|||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||
restart: always
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||
|
||||
|
@ -134,6 +140,8 @@ services:
|
|||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
@ -153,6 +161,8 @@ services:
|
|||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||
restart: always
|
||||
command: bundle exec sidekiq
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue