try different Health settings

This commit is contained in:
zenfyr 2026-01-11 10:07:38 +07:00
commit d25b699e27
Signed by: melontini
SSH key fingerprint: SHA256:TtcIcnTnoAB5mqHofsaOxIgiMzfVBxej1AXT7DQdrTE
10 changed files with 52 additions and 27 deletions

View file

@ -10,11 +10,13 @@ Environment=DFLY_default_lua_flags=allow-undeclared-keys
Environment=DFLY_dbfilename=dump.rdb
Environment=DFLY_df_snapshot_format=false
Environment=DFLY_dir=/data
HealthCmd=redis-cli ping
HealthInterval=5s
HealthRetries=20
Network=mastodon.network
Volume=/var/containers/mastodon/dragonfly:/data:Z
# Health
HealthCmd=redis-cli ping
HealthOnFailure=kill
HealthStartPeriod=10s
Notify=healthy
[Service]
Restart=always

View file

@ -9,10 +9,14 @@ ContainerName=mastodon-sidekiq
EnvironmentFile=/etc/containers/systemd/mastodon/.env.secrets
EnvironmentFile=/etc/containers/systemd/mastodon/.env
Exec=bundle exec sidekiq
HealthCmd=ps aux | grep '[s]idekiq 7' || false
Network=mastodon.network
Network=postgresql.network
Volume=/var/containers/mastodon/public/system:/mastodon/public/system:z
# Health
HealthCmd=ps aux | grep '[s]idekiq\ 8' || false
HealthOnFailure=kill
HealthStartPeriod=1m
Notify=healthy
[Service]
Restart=always

View file

@ -9,10 +9,14 @@ ContainerName=mastodon-streaming
EnvironmentFile=/etc/containers/systemd/mastodon/.env.secrets
EnvironmentFile=/etc/containers/systemd/mastodon/.env
Exec=node ./streaming/index.js
HealthCmd=curl -s --noproxy localhost localhost:4000/api/v1/streaming/health | grep -q 'OK' || exit 1
Network=mastodon.network
Network=postgresql.network
PublishPort=127.0.0.1:58834:4000
# Health
HealthCmd=curl -s --noproxy localhost localhost:4000/api/v1/streaming/health | grep -q 'OK' || exit 1
HealthOnFailure=kill
HealthStartPeriod=1m
Notify=healthy
[Service]
Restart=always

View file

@ -9,13 +9,17 @@ ContainerName=mastodon-web
EnvironmentFile=/etc/containers/systemd/mastodon/.env.secrets
EnvironmentFile=/etc/containers/systemd/mastodon/.env
Exec=bundle exec puma -C config/puma.rb
HealthCmd=curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1
Network=mastodon.network
Network=postgresql.network
PublishPort=127.0.0.1:46098:3000
Volume=/var/containers/mastodon/public/system:/mastodon/public/system:z
Volume=/var/containers/mastodon/init/disable_ssl.rb:/mastodon/config/initializers/disable_ssl.rb:ro,z
Volume=/var/containers/mastodon/shared:/shared:z
# Health
HealthCmd=curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1
HealthOnFailure=kill
HealthStartPeriod=1m
Notify=healthy
[Service]
Restart=always