Skip to content
Snippets Groups Projects
Commit 0b3606d8 authored by David Trattnig's avatar David Trattnig
Browse files

Added recreate-database.

parent 9f925142
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,15 @@ docker="false"
# - lqs
# - api-dev
# - api
#
# - recreate-database
# - docker:engine
# - docker:core
# - docker:lqs
# - docker:recreate-database
# - docker:build
# - docker:api
#
#
if [[ $* =~ ^(engine|core|lqs|api-dev|api)$ ]]; then
mode=$1
......@@ -78,6 +80,12 @@ if [[ $docker == "false" ]]; then
gunicorn -c configuration/gunicorn.conf.py engine-api:app
fi
### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then
/usr/bin/env python3.7 engine-core.py --recreate-database
fi
fi
......@@ -137,6 +145,16 @@ if [[ $docker == "true" ]]; then
-c "gunicorn -c configuration/gunicorn.conf.py engine-api:app"
fi
### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then
exec sudo docker run --rm -it \
-u $UID:$GID \
-v "$BASE_D":/srv \
-v "$BASE_D/configuration/":/etc/aura \
--tmpfs /var/log/aura/ autoradio/engine /srv/engine-core.py --recreate-database
fi
### Create Docker Image from local project ###
if [[ $mode == "build" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment