Add health checks for mastodon
This commit is contained in:
parent
4aca41125e
commit
9a9da8e7d0
2 changed files with 23 additions and 3 deletions
|
@ -138,16 +138,20 @@ backend comfycamp
|
|||
|
||||
backend mastodon
|
||||
mode http
|
||||
option httpchk GET /health
|
||||
http-check expect status 200
|
||||
http-response set-header Referrer-Policy same-origin
|
||||
http-response set-header Onion-Location http://mcomfyzeyibt2unmkttoxa2li2dzpsljcp3sasrioqsks4ayrl5kk2ad.onion%[capture.req.uri]
|
||||
server s1 mastodon-web-1:3000 check
|
||||
server s2 mastodon-web-2:3000 check
|
||||
server s1 mastodon-web-1:3000 check inter 10s
|
||||
server s2 mastodon-web-2:3000 check inter 10s
|
||||
|
||||
backend mastodon_streaming
|
||||
mode http
|
||||
option httpchk GET /api/v1/streaming/health
|
||||
http-check expect status 200
|
||||
option http-server-close
|
||||
timeout tunnel 1h
|
||||
server green mastodon-streaming:4000 check
|
||||
server green mastodon-streaming:4000 check inter 10s
|
||||
|
||||
backend vaultwarden
|
||||
mode http
|
||||
|
|
|
@ -56,6 +56,14 @@
|
|||
volumes:
|
||||
- mastodon-public-system:/mastodon/public/system
|
||||
restart_policy: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "127.0.0.1:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
# TODO: enable after ansible update
|
||||
# state: healthy
|
||||
loop: ["1", "2"]
|
||||
- name: Create streaming container
|
||||
become: true
|
||||
|
@ -69,6 +77,14 @@
|
|||
- name: postgresql
|
||||
- name: haproxy
|
||||
restart_policy: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "127.0.0.1:4000/api/v1/streaming/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
# TODO: enable after ansible update
|
||||
# state: healthy
|
||||
- name: Create sidekiq container
|
||||
become: true
|
||||
community.docker.docker_container:
|
||||
|
|
Loading…
Reference in a new issue