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

Updated server location.

parent c3f4ddcc
No related branches found
No related tags found
No related merge requests found
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
"request": "launch", "request": "launch",
"stopOnEntry": false, "stopOnEntry": false,
// "cwd": "${workspaceRoot}", // "cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/engine-api.py", "program": "${workspaceRoot}/src/server.py",
"env": { "env": {
"FLASK_APP": "${workspaceRoot}/src/engine-api.py", "FLASK_APP": "${workspaceRoot}/src/server.py",
"FLASK_ENV": "development" "FLASK_ENV": "development"
} }
// "args": [ // "args": [
......
...@@ -43,7 +43,7 @@ if [[ $docker == "false" ]]; then ...@@ -43,7 +43,7 @@ if [[ $docker == "false" ]]; then
# echo "Building Web Applications" # echo "Building Web Applications"
# sh ./script/build-web.sh # sh ./script/build-web.sh
echo "Starting API Server" echo "Starting API Server"
/usr/bin/env python3.7 engine-api.py /usr/bin/env python3.7 src/server.py
fi fi
### Runs the API Server using Gunicorn without a system daemon (Production) ### ### Runs the API Server using Gunicorn without a system daemon (Production) ###
...@@ -52,13 +52,13 @@ if [[ $docker == "false" ]]; then ...@@ -52,13 +52,13 @@ if [[ $docker == "false" ]]; then
echo "Activating Python Environment" echo "Activating Python Environment"
source ../python-env/bin/activate source ../python-env/bin/activate
echo "Starting API Server" echo "Starting API Server"
gunicorn -c config/gunicorn.conf.py engine-api:app gunicorn -c config/gunicorn.conf.py src.server:app
fi fi
### CAUTION: This deletes everything in your database ### ### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then if [[ $mode == "recreate-database" ]]; then
/usr/bin/env python3.7 engine-api.py --recreate-database /usr/bin/env python3.7 src/server.py --recreate-database
fi fi
fi fi
...@@ -74,13 +74,10 @@ if [[ $docker == "true" ]]; then ...@@ -74,13 +74,10 @@ if [[ $docker == "true" ]]; then
if [[ $mode == "api" ]]; then if [[ $mode == "api" ]]; then
exec sudo docker run --name engine-api --rm -it \ exec sudo docker run --name engine-api --rm -it \
-u $UID:$GID \ -u $UID:$GID \
-p 127.0.0.1:8050:5000 \ -p 127.0.0.1:8008:8008 \
-p 8008:8008 \
-v "$BASE_D":/srv \ -v "$BASE_D":/srv \
-v "$BASE_D/configuration/":/etc/aura \ -v "$BASE_D/configuration/":/etc/aura \
--tmpfs /var/log/aura/ autoradio/engine-api /srv/engine-api.py \ --tmpfs /var/log/aura/ autoradio/engine-api
#--device autoradio/engine-api /bin/bash
# -c "gunicorn -c configuration/gunicorn.conf.py engine-api.py:app"
fi fi
### Create Docker Image from local project ### ### 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