-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (61 loc) · 1.96 KB
/
Makefile
File metadata and controls
72 lines (61 loc) · 1.96 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
VENV?=venv
PYTHON3_PATH?=${VENV}/bin/python3
PIP3_PATH?=${VENV}/bin/pip3
install:
#
# Configure Python Flask back end
#
${PIP3_PATH} install -r requirements.txt
#
# Configure node.js web application
#
cd frontend; cp template.env .env; npm install; npm audit fix
data:
mkdir -p backend/data/diagrams
mkdir -p backend/data/sbgn
# download data
cd backend/data ; \
wget https://github.com/monarch-initiative/mondo/releases/download/current/mondo.json ; \
curl -O https://reactome.org/download/current/diagrams.png.tgz ; \
tar -xvzf diagrams.png.tgz --directory diagrams ; \
curl -O https://reactome.org/download/current/homo_sapiens.sbgn.tar.gz ; \
tar -xvzf homo_sapiens.sbgn.tar.gz --directory sbgn
# Preprocess data
python scripts/build_id_mapping_csv.py -o backend/data/id_mapping.csv
python scripts/fix_sbgn.py
.PHONY: web venv
service:
nohup ${PYTHON3_PATH} -m backend >logs/service_`date`.log 2>&1 &
web:
cd frontend; nohup npm start >../logs/web_`date`.log 2>&1 &
project_settings:
@echo "Python Virtual Environment (VENV) specified to be located in the subdirectory '${VENV}'"
@echo "Path to python3 ('PYTHON3_PATH') is specified to be located at path '${PYTHON3_PATH}'"
@echo "Path to pip3 ('PIP3_PATH') is specified to be located at path '${PIP3_PATH}'"
@echo "Override the these environment variables as needed, according to your site installation particulars"
start:
make start-backend
make start-workflow
make start-frontend
start-backend:
./venv/bin/gunicorn \
-b 0.0.0.0:5000 \
--preload \
--access-logfile - \
--error-logfile - \
--timeout 300 \
-w 5 \
backend:app
start-workflow:
./venv/bin/gunicorn \
-b 0.0.0.0:8080 \
--preload \
--access-logfile - \
--error-logfile - \
--timeout 300 \
-w 5 \
workflow:app
start-frontend:
cd frontend && npm start
download-swagger:
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.jar -O swagger-codegen-cli.jar