Merge pull request #36 from numahell/16-make-deploy

Add make rule for deployement
This commit is contained in:
Guillaume Ayoub 2018-10-04 15:38:39 +02:00 committed by GitHub
commit 46494a2fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@ VENV = $(PWD)/.env
PIP = $(VENV)/bin/pip
PYTHON = $(VENV)/bin/python
FLASK = $(VENV)/bin/flask
AFPY_SERVER = afpy_web
all: install serve
@ -22,3 +23,7 @@ test:
serve:
env FLASK_APP=afpy.py FLASK_ENV=development $(FLASK) run
afpy:
ssh -t $(AFPY_SERVER) 'cd site && git pull'
ssh -t $(AFPY_SERVER) 'killall uwsgi && /usr/local/etc/rc.d/uwsgi restart'

View File

@ -13,3 +13,9 @@ d'abord.
Si vous avez votre propre venv, un `FLASK_APP=afpy.py
FLASK_ENV=development flask run` vous suffira.
## Déployer
Pour publier lancez `make afpy`.
Votre clé ssh publique doit être installée sur le serveur pour pouvoir déployer, et configurer la connexion ssh avec les informations fournies par les admins.