forked from MannLabs/CKG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker_entrypoint.sh
32 lines (25 loc) · 1.06 KB
/
docker_entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "Entry point to CKG Docker"
cd /CKG
echo "Starting Neo4j"
service neo4j start &
service neo4j status
while ! [[ `wget -S --spider http://localhost:7474 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; do
echo "Database not ready"
sleep 45
done
echo "Database ready"
echo "Creating Test user in the database"
python3 ckg/graphdb_builder/builder/create_user.py -u test_user -d test_user -n test -e [email protected] -a test -p 12345678
echo "Running jupyterHub"
jupyterhub -f /etc/jupyterhub/jupyterhub.py --no-ssl &
echo "Running redis-server"
service redis-server start
echo "Running celery queues"
cd ckg/report_manager
celery -A ckg.report_manager.worker worker --loglevel=INFO --concurrency=1 -E -Q creation --uid 1500 --gid nginx &
celery -A ckg.report_manager.worker worker --loglevel=INFO --concurrency=3 -E -Q compute --uid 1500 --gid nginx &
celery -A ckg.report_manager.worker worker --loglevel=INFO --concurrency=1 -E -Q update --uid 1500 --gid nginx &
echo "Initiating CKG app"
cd /CKG
nginx && uwsgi --ini /etc/uwsgi/apps-enabled/uwsgi.ini --uid 1500 --gid nginx