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)

View File

@ -20,6 +20,7 @@ PYTHON = $(VENV)/bin/python
PIPENV = $(shell command -v pipenv 2> /dev/null)
FLASK = $(VENV)/bin/flask
PYTEST = $(VENV)/bin/py.test
GUNICORN = $(VENV)/bin/gunicorn
COV = $(VENV)/bin/python-codacy-coverage
# Node env

View File

@ -13,6 +13,7 @@ gpxpy = "==1.2.0"
staticmap = "==0.5.3"
pytz = "==2018.4"
python-forecastio = "==1.4.0"
gunicorn = "==19.8.1"
[dev-packages]
pytest = "==3.6.1"

View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "92d0c43fa07e58aa6a8d6fe38cd8792c363ea6211e6820d2cfc8158267cec57e"
"sha256": "e3e55984559d903ea7c15da7610aa364b9323cb1d0f0b6b8f001a07a17a1bdf2"
},
"pipfile-spec": 6,
"requires": {
@ -153,6 +153,14 @@
"index": "pypi",
"version": "==1.2.0"
},
"gunicorn": {
"hashes": [
"sha256:7ef2b828b335ed58e3b64ffa84caceb0a7dd7c5ca12f217241350dec36a1d5dc",
"sha256:bc59005979efb6d2dd7d5ba72d99f8a8422862ad17ff3a16e900684630dd2a10"
],
"index": "pypi",
"version": "==19.8.1"
},
"idna": {
"hashes": [
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",