11SHELL = /bin/bash
22SUPERVISORD=FLAGS =$$FLAGS supervisord -c baselayer/conf/supervisor/supervisor.conf
33SUPERVISORCTL=FLAGS =$$FLAGS supervisorctl -c baselayer/conf/supervisor/supervisor.conf
4+ ENV_SUMMARY=PYTHONPATH =. ./baselayer/tools/env_summary.py $$FLAGS
5+ ESLINT =./node_modules/.bin/eslint
46
57.DEFAULT_GOAL := run
68
79bundle = ./static/build/bundle.js
810webpack = ./node_modules/.bin/webpack
11+ baselayer_branch = $(shell git config -f .gitmodules submodule.baselayer.branch)
912
1013baselayer/README.md :
1114 git submodule update --init --remote
@@ -43,14 +46,32 @@ log: paths
4346 ./baselayer/tools/watch_logs.py
4447
4548run : paths dependencies
46- @echo " Supervisor will now fire up various micro- services."
49+ @echo " Supervisor will now fire up various services."
4750 @echo
48- @echo " - Please run \` make log\` in another terminal to view logs"
49- @echo " - Press Ctrl-C to abort the server"
51+ @echo " - Run \` make log\` in another terminal to view logs"
5052 @echo " - Run \` make monitor\` in another terminal to restart services"
5153 @echo
54+ @echo " The server is in debug mode:"
55+ @echo " JavaScript and Python files will be reloaded upon change."
56+ @echo
57+
58+ @FLAGS="--debug" && \
59+ $(ENV_SUMMARY) && echo && \
60+ echo "Press Ctrl-C to abort the server" && \
61+ echo && \
5262 $(SUPERVISORD)
5363
64+ run_production :
65+ export FLAGS=" --config config.yaml" && \
66+ $(ENV_SUMMARY ) && \
67+ $(SUPERVISORD )
68+
69+ run_testing : paths dependencies
70+ export FLAGS=" --config _test_config.yaml" && \
71+ $(ENV_SUMMARY ) && \
72+ $(SUPERVISORD )
73+
74+
5475monitor :
5576 @echo " Entering supervisor control panel."
5677 @echo " - Type \` status\` too see microservice status"
@@ -60,11 +81,15 @@ monitor:
6081attach :
6182 $(SUPERVISORCTL ) fg app
6283
63- testrun : paths dependencies
64- export FLAGS=" --config _test_config.yaml" && $(SUPERVISORD )
84+ run_production :
85+ export FLAGS=" --config config.yaml" && \
86+ $(ENV_SUMMARY ) && \
87+ $(SUPERVISORD )
6588
66- dockerrun : paths dependencies
67- export FLAGS=" --config docker.yaml" && $(SUPERVISORD )
89+ run_testing : paths dependencies
90+ export FLAGS=" --config _test_config.yaml" && \
91+ $(ENV_SUMMARY ) && \
92+ $(SUPERVISORD )
6893
6994debug :
7095 @echo " Starting web service in debug mode"
0 commit comments