Howdy;
I saw this chunk in the fly.toml of a fly tutorial
[[services.script_checks]]
But couldn’t find the details in the docs
I just wanted to confirm that script_checks
is still supported. If I’m greedy I’d also love docs, but it’s pretty understandable from the GithHub repo.
Thanks a bunch. Fly makes me swoon.
1 Like
It is supported, not documented yet. We use it ourselves for a few apps.
Here’s what it may look like:
[[services.script_checks]]
command = "/path/to/your/script"
args = ["a", "b", "c"]
grace_period = "1s"
interval = "5s"
restart_limit = 0
timeout = "1s"
1 Like
Fantastic! Thanks @jerome . What’s the grace_period
allow?
It’s the delay before starting the health checks after your instance has been started.
beshur
October 14, 2022, 9:15am
5
Thank you!
Will it work for daily checks with interval = "86400s"
on a Hobby plan?
@beshur I don’t think this feature is going to be available in the long term based on some other messages in the forum. @jerome can you confirm one way or the other?
We ended up using supervisord
based on the guide here: Running Multiple Processes Inside A Fly.io App · Fly Docs
hgezim
April 3, 2023, 4:30pm
7
Does anyone know how to specify a script_checks
for apps without a service?
I have an app that doesn’t need a services section as per the docs :
You can have:
No services section: The application has no mappings to the external internet - typically apps like databases that talk over 6PN private networking to other apps.
How do I specify a health check using a script?
This doesn’t seem to be doing it. There’s an implicit service that opens up 8080:
# fly.toml file generated for name here on 2023-04-02T08:37:33Z
app = "name here"
kill_signal = "SIGINT"
kill_timeou…
eevee
May 25, 2023, 2:39am
8
Has this feature been removed as @eyepulp says?
I currently have this in my fly.toml:
[[services.script_checks]]
command = "/app/health_check.sh"
grace_period = "2s"
interval = "5s"
restart_limit = 0
timeout = "1s"
The referenced script returns exit 1 and does not fail the deploy.
Running flyctl checks list
only shows servicecheck-01-http-8080
and servicecheck-00-tcp-8080
regardless of if the script returns exit 1 or 0.
I can execute health_check.sh when using flyctl ssh console
no problem.
I’ve also tried putting gibberish:
command = "nonsense"
And tried adding bash:
command = "bash /app/health_check.sh"
With similar results.
I have the exact same problem. Any help/ideas? Or has the feature indeed been removed?
script_checks
doesn’t exist in Apps v2.