Better examples

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 16:14:30 +00:00
parent fd658f7545
commit f74df5962e
11 changed files with 152 additions and 25 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env ssm
# Example application that depends on PostgreSQL.
#
# service_depends_ready makes ssm start the postgres service and wait
# for it to report ready before starting this one.
service_respawn = always
service_depends_ready = postgres
service_command = /usr/bin/webapp --config /etc/webapp/config.toml
# Wait for the app to answer on its HTTP port. ssm polls this hook until
# the ready timeout expires.
ready() {
(exec 3<>/dev/tcp/127.0.0.1/8080) 2>/dev/null
}