Spaces:
Running
Running
File size: 560 Bytes
4e645a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/usr/bin/env bash
set -euo pipefail
: "${WebApi__BaseUrl:=http://127.0.0.1:5001/api/}"
export WebApi__BaseUrl
dotnet /app/api/TaskTrackingSystem.WebApi.dll --contentRoot /app/api --urls http://127.0.0.1:5001 &
api_pid=$!
dotnet /app/webapp/TaskTrackingSystem.WebApp.dll --contentRoot /app/webapp --urls http://127.0.0.1:5000 &
webapp_pid=$!
term_handler() {
kill "$api_pid" "$webapp_pid" 2>/dev/null || true
exit 0
}
trap term_handler SIGTERM SIGINT
nginx -g 'daemon off;' &
nginx_pid=$!
wait -n "$api_pid" "$webapp_pid" "$nginx_pid"
term_handler
|