-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
路20 lines (16 loc) 路 713 Bytes
/
Copy pathentrypoint.sh
File metadata and controls
executable file
路20 lines (16 loc) 路 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
echo "Running database migration.."
python -m flask db upgrade
if [ "$(echo "$SINGLE_USER_MODE" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
if [ -n "$AUTH_DEFAULT_USER" ]; then
echo "WARNING: Both SINGLE_USER_MODE and AUTH_DEFAULT_USER are set."
echo "Defaulting to Single User Mode..."
fi
echo "Single User Mode enabled. Bootstrapping local environment..."
python -m flask user bootstrap-single-user
elif [ -n "${AUTH_DEFAULT_USER+1}" ]; then
echo "\$AUTH_DEFAULT_USER is set"
python -m flask user create "$AUTH_DEFAULT_USER" "$AUTH_DEFAULT_USER" user --password "$AUTH_DEFAULT_PASSWORD"
fi
echo "Starting gunicorn.."
exec gunicorn -w 4 -b :5000 api.app:app