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

Use new entry class.

parent fa2e8a7b
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ if [[ $docker == "false" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server"
/usr/bin/env python3.7 -m src
/usr/bin/env python3.7 engine-api.py
fi
### Runs the API Server using Gunicorn without a system daemon (Production) ###
......@@ -52,13 +52,13 @@ if [[ $docker == "false" ]]; then
echo "Activating Python Environment"
source ../python-env/bin/activate
echo "Starting API Server"
gunicorn -c configuration/gunicorn.conf.py src:app
gunicorn -c config/gunicorn.conf.py engine-api:app
fi
### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then
/usr/bin/env python3.7 -m src --recreate-database
/usr/bin/env python3.7 engine-api.py --recreate-database
fi
fi
......@@ -71,26 +71,25 @@ if [[ $docker == "true" ]]; then
### Runs Engine API using Gunicorn ###
# if [[ $mode == "api" ]]; then
# exec sudo docker run --name engine-api --rm -it \
# if [[ $mode == "engine" ]]; then
# exec sudo docker run --name aura-engine --rm -it \
# -u $UID:$GID \
# -p 127.0.0.1:8050:5000 \
# -v "$BASE_D":/srv \
# -v "$BASE_D/configuration/":/etc/aura \
# --tmpfs /var/log/aura/ autoradio/engine-api /srv/src/__main__.py \
# --device autoradio/engine-api /bin/bash \
# -c "gunicorn -c configuration/gunicorn.conf.py -m src:app"
# --tmpfs /var/log/aura/ autoradio/engine /srv/engine-core.py
# fi
if [[ $mode == "api" ]]; then
exec sudo docker run --name engine-api --rm -it \
-u $UID:$GID \
-p 127.0.0.1:8050:5000 \
-v "$BASE_D":/srv \
-v "$BASE_D/configuration/":/etc/aura \
--tmpfs /var/log/aura/ autoradio/engine-api /srv/src \
--device autoradio/engine /bin/bash
# -c "gunicorn -c configuration/gunicorn.conf.py src/__main__.py:app"
--tmpfs /var/log/aura/ autoradio/engine-api /srv/engine-api.py \
#--device autoradio/engine-api /bin/bash
# -c "gunicorn -c configuration/gunicorn.conf.py engine-api.py:app"
fi
### CAUTION: This deletes everything in your database ###
......@@ -100,7 +99,7 @@ if [[ $docker == "true" ]]; then
-u $UID:$GID \
-v "$BASE_D":/srv \
-v "$BASE_D/configuration/":/etc/aura \
--tmpfs /var/log/aura/ autoradio/engine-api /srv/src --recreate-database
--tmpfs /var/log/aura/ autoradio/engine-api /srv/engine-api.py --recreate-database
fi
### Create Docker Image from local project ###
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment