Add scheduler backend image workflow
All checks were successful
Build scheduler-backend image / build-and-push (push) Successful in 3m36s

This commit is contained in:
Developer
2026-05-28 13:15:30 +07:00
parent 5f93d025d2
commit 433fb60f0a
5 changed files with 356 additions and 0 deletions

31
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
set -eu
/app/api &
api_pid="$!"
/app/worker &
worker_pid="$!"
term() {
kill "$api_pid" "$worker_pid" 2>/dev/null || true
wait "$api_pid" "$worker_pid" 2>/dev/null || true
}
trap term INT TERM
while :; do
if ! kill -0 "$api_pid" 2>/dev/null; then
wait "$api_pid" || true
term
exit 1
fi
if ! kill -0 "$worker_pid" 2>/dev/null; then
wait "$worker_pid" || true
term
exit 1
fi
sleep 2
done