mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Generalize docker-entrypoint for further flask commands
This commit is contained in:
parent
14503eb45a
commit
2c4a6a8cea
@ -1,19 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
venv/bin/python -u opaque.py
|
venv/bin/python -u opaque.py
|
||||||
elif [[ $1 == "--migrate" ]]
|
elif [ $1 == "flask" ]
|
||||||
then
|
then
|
||||||
echo Migrating changes.
|
echo "$@"
|
||||||
venv/bin/python -m flask db migrate
|
venv/bin/python -m $@
|
||||||
venv/bin/python -m flask db upgrade
|
|
||||||
else
|
else
|
||||||
if [[ $1 == "--setup-database" ]]
|
echo "Unknown command"
|
||||||
then
|
|
||||||
echo Initial setup of database.
|
|
||||||
venv/bin/python -m flask db init
|
|
||||||
venv/bin/python -m flask db upgrade
|
|
||||||
venv/bin/python -m flask insert-initial-database-entries
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user