Document deploy via github

This commit is contained in:
Julien Palard 2019-12-18 00:10:27 +01:00
parent 6ba9bc325c
commit b89ce1f2c1
2 changed files with 4 additions and 9 deletions

View File

@ -4,7 +4,6 @@ PYTHON = $(VENV)/bin/python
FLASK = $(VENV)/bin/flask FLASK = $(VENV)/bin/flask
ISORT = $(VENV)/bin/isort ISORT = $(VENV)/bin/isort
BLACK = $(VENV)/bin/black BLACK = $(VENV)/bin/black
AFPY_SERVER = afpy_web
all: install serve all: install serve
@ -26,13 +25,10 @@ test:
serve: serve:
env FLASK_APP=afpy.py FLASK_ENV=development $(FLASK) run env FLASK_APP=afpy.py FLASK_ENV=development $(FLASK) run
afpy:
ssh -t $(AFPY_SERVER) 'cd site && git pull'
ssh -t $(AFPY_SERVER) 'cd site && make install LANG=en_US.UTF-8'
ssh -t $(AFPY_SERVER) 'killall uwsgi-3.6 && /usr/local/etc/rc.d/uwsgi restart'
isort: isort:
$(ISORT) -rc .isort.cfg afpy.py tests.py $(ISORT) -rc .isort.cfg afpy.py tests.py
black: black:
$(VENV)/bin/black afpy.py tests.py $(VENV)/bin/black afpy.py tests.py
.PHONY: all install clean check-outdated test serve isort black

View File

@ -14,8 +14,7 @@ d'abord.
Si vous avez votre propre venv, un `FLASK_APP=afpy.py Si vous avez votre propre venv, un `FLASK_APP=afpy.py
FLASK_ENV=development flask run` vous suffira. FLASK_ENV=development flask run` vous suffira.
## Déployer ## Déployer
Pour publier lancez `make afpy`. Pour publier il suffit de `git push`, une action github s'occupe de la mise en prod.
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.