Setup config for deploying both worker and web (#362)

This commit is contained in:
Max Wofford
2025-06-25 14:44:57 -04:00
committed by GitHub
parent 97f8119e8d
commit 7c5b869bce
5 changed files with 47 additions and 3 deletions

18
bin/start-process Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash -e
# Start the appropriate process based on PROCESS_TYPE environment variable
case "$PROCESS_TYPE" in
web)
echo "Starting web server..."
exec ./bin/thrust ./bin/rails server -b 0.0.0.0 -p ${PORT:-80}
;;
worker)
echo "Starting GoodJob worker..."
exec bundle exec good_job start
;;
*)
echo "Unknown PROCESS_TYPE: $PROCESS_TYPE"
echo "Valid options: web, worker"
exit 1
;;
esac