forked from inspirehep/inspirehep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (46 loc) · 2.26 KB
/
Makefile
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
# Set the AIRFLOW_HOME environment variable
export AIRFLOW_HOME=$(shell pwd)/workflows
export AIRFLOW_PROJ_DIR=$(AIRFLOW_HOME)
sleep:
sleep 10
run: services start-inspirehep sleep setup-inspirehep start-backoffice sleep setup-backoffice
run-inspirehep: services start-inspirehep sleep setup-inspirehep
run-backoffice: services start-backoffice sleep setup-backoffice
start: services start-inspirehep start-backoffice
start-inspirehep:
echo -e "\033[0;32m Starting HEP. \033[0m"
docker compose up -d hep-worker hep-web record-editor hep-ui ui
echo -e "\033[0;32m HEP Started. \033[0m"
start-backoffice:
echo -e "\033[0;32m Starting Backoffice. \033[0m"
docker compose up -d airflow-init airflow-worker airflow-webserver airflow-triggerer airflow-scheduler backoffice-webserver
echo -e "\033[0;32m Backoffice Started. \033[0m"
setup-backoffice: django-setup airflow-setup
django-setup:
docker compose exec backoffice-webserver python manage.py create_groups
docker compose exec backoffice-webserver python manage.py loaddata backoffice/users/fixtures/users.json
docker compose exec backoffice-webserver python manage.py loaddata backoffice/users/fixtures/tokens.json
docker compose exec backoffice-webserver python manage.py loaddata backoffice/authors/fixtures/workflows.json
echo "\033[1;32memail: [email protected] / password: admin \033[0m"
echo "Backoffice initialized"
airflow-setup:
docker compose exec airflow-webserver /entrypoint airflow connections import ./scripts/connections/connections.json
docker compose exec airflow-webserver /entrypoint airflow variables import ./scripts/variables/variables.json
echo "\033[31mCHANGE inspire_token in Admin->Variables\033[0m"
echo "\033[1;32musername: airflow / password: airflow \033[0m"
echo "Workflows initialized"
stop:
docker compose down
echo -e "\033[0;32m Inspire Stopped. \033[0m"
ui:
docker compose up -d ui
setup-inspirehep: hep-setup sleep load-records
hep-setup:
echo -e "\033[0;32m Starting setup Inspire. \033[0m"
docker compose -f docker-compose.yml exec hep-web ./scripts/setup
echo -e "\033[0;32m Finished setup Inspire. \033[0m"
load-records:
echo -e "\033[0;32m Loading records. \033[0m"
docker compose exec hep-web inspirehep importer demo-records
services:
docker compose up -d cache db mq s3 es