Skip to content
Snippets Groups Projects
Commit 34c4f38b authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Fix bug on corpus analysis startup

parent 52c25fd5
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
source venv/bin/activate source venv/bin/activate
if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then if [[ "${NOPAQUE_DAEMON_ENABLED:-True}" == "True" ]]; then
echo "INFO Starting nopaque daemon process..." echo "INFO Starting nopaque daemon process..."
./nopaque-daemon.sh & ./nopaque-daemon.sh &
...@@ -16,7 +14,7 @@ if [[ "${#}" -eq 0 ]]; then ...@@ -16,7 +14,7 @@ if [[ "${#}" -eq 0 ]]; then
echo "Deploy command failed, retrying in 5 secs..." echo "Deploy command failed, retrying in 5 secs..."
sleep 5 sleep 5
done done
python nopaque.py gunicorn $([ "${ENABLE_GUNICORN_RELOAD:-False}" == "True" ] && echo "--reload") --worker-class eventlet -b :5000 -w 1 nopaque:app
elif [[ "${1}" == "flask" ]]; then elif [[ "${1}" == "flask" ]]; then
exec ${@:1} exec ${@:1}
else else
......
...@@ -2,6 +2,8 @@ version: "3.5" ...@@ -2,6 +2,8 @@ version: "3.5"
services: services:
nopaque: nopaque:
environment:
- ENABLE_GUNICORN_RELOAD=True
ports: ports:
- "5000:5000" - "5000:5000"
volumes: volumes:
...@@ -11,5 +13,6 @@ services: ...@@ -11,5 +13,6 @@ services:
- "./config.py:/home/nopaque/config.py" - "./config.py:/home/nopaque/config.py"
- "./migrations:/home/nopaque/migrations" - "./migrations:/home/nopaque/migrations"
- "./nopaque.py:/home/nopaque/nopaque.py" - "./nopaque.py:/home/nopaque/nopaque.py"
- "./nopaque-daemon.sh:/home/nopaque/nopaque-daemon.sh"
- "./requirements.txt:/home/nopaque/requirements.txt" - "./requirements.txt:/home/nopaque/requirements.txt"
- "./tests:/home/nopaque/tests" - "./tests:/home/nopaque/tests"
# First things first: apply monkey patch, so that no code gets executed without # First things first: apply monkey patch, so that no code gets executed without
# patched libraries! # patched libraries!
import eventlet import eventlet
eventlet.monkey_patch() eventlet.monkey_patch()
...@@ -26,9 +24,3 @@ def make_shell_context(): ...@@ -26,9 +24,3 @@ def make_shell_context():
'QueryResult': QueryResult, 'QueryResult': QueryResult,
'Role': Role, 'Role': Role,
'User': User} 'User': User}
if __name__ == '__main__':
host = '0.0.0.0'
port = 5000
socketio.run(app, host=host, port=port)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment