forked from redhat-exd-rebuilds/freshmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manager
executable file
·51 lines (39 loc) · 985 Bytes
/
manager
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
project_root="$(dirname "$(realpath $0)")"
export PYTHONPATH="${project_root}"
export FRESHMAKER_DEVELOPER_ENV=1
manage_py="python "${project_root}/freshmaker/manage.py""
function usage
{
echo "Commands:"
echo " createdb Create database"
echo " runfrontend Run frontend API webapp"
echo " runfreshmaker Run backend service and frontend API webapp together"
}
case $1 in
help | -h | --help)
usage
echo
echo "Following commands from manage.py are usable as well."
echo
$manage_py --help
;;
createdb)
$manage_py upgradedb
$manage_py db migrate
;;
runfrontend)
$manage_py runssl
;;
runfreshmaker)
"${project_root}/start_backend_from_here" &
PIDS[0]=$!
trap "kill ${PIDS[*]}" SIGINT
if ! $manage_py runssl; then
wait
fi
;;
*)
$manage_py "$@"
esac
# vim:sw=4