app deployment

This commit is contained in:
Sam
2018-06-20 15:27:52 +02:00
parent 454ac19ca5
commit 48538a63e1
4 changed files with 23 additions and 1 deletions

View File

@ -6,6 +6,9 @@ make-p:
# Launch all P targets in parallel and exit as soon as one exits.
set -m; (for p in $(P); do ($(MAKE) $$p || kill 0)& done; wait)
build-client:
$(NPM) build
clean-install:
rm -fr $(NODE_MODULES)
rm -fr $(VENV)
@ -42,6 +45,15 @@ lint-react:
migrate-db:
$(FLASK) db migrate --directory $(MIGRATIONS)
run:
$(MAKE) P="run-server run-client" make-p
run-client:
serve -s fittrackee_client/build -l 3000
run-server:
cd fittrackee_api && $(GUNICORN) -b 127.0.0.1:5000 "fittrackee_api:create_app()"
serve-python:
$(FLASK) run --with-threads -h $(HOST) -p $(API_PORT)