forked from RedHatInsights/compliance-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·26 lines (23 loc) · 875 Bytes
/
entrypoint.sh
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
26
#!/bin/bash
set -e
if [ -z "$APPLICATION_TYPE" ]; then
echo "APPLICATION_TYPE not defined!"
exit 1
fi
if [ "$APPLICATION_TYPE" = "compliance-backend" ]; then
exec bundle exec puma
elif [ "$APPLICATION_TYPE" = "compliance-inventory" ]; then
exec bundle exec racecar InventoryEventsConsumer
elif [ "$APPLICATION_TYPE" = "compliance-sidekiq" ]; then
exec bundle exec sidekiq
elif [ "$APPLICATION_TYPE" = "compliance-import-remediations" ]; then
exec bundle exec rake import_remediations --trace
elif [ "$APPLICATION_TYPE" = "compliance-import-ssg" ]; then
exec bundle exec rake ssg:import_rhel_supported --trace
elif [ "$APPLICATION_TYPE" = "compliance-reindex-db" ]; then
exec bundle exec rake db:reindex --trace
elif [ "$APPLICATION_TYPE" = "sleep" ]; then
while true; do sleep 60; done
else
echo "Application type '$APPLICATION_TYPE' not supported"
fi