This commit is contained in:
mco-system 2023-04-06 22:22:49 +11:00
parent b71fa47cde
commit 88dd8cc849
1 changed files with 4 additions and 2 deletions

View File

@ -9,23 +9,25 @@ install:
pip install -r requirements.txt ;\ pip install -r requirements.txt ;\
pip install . ;\ pip install . ;\
pip install gunicorn; \ pip install gunicorn; \
sudo chown apache:apache $$THSF_DIR
run: run:
set -e ;\ set -e ;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Démarrage dans $$THSF_DIR; \ echo [+] Démarrage dans $$THSF_DIR; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \
sudo -u apache thsf_venv/bin/gunicorn -D -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app' thsf_venv/bin/gunicorn -D -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app'
stop: stop:
-set -e;\ -set -e;\
THSF_DIR=$$(pwd); \ THSF_DIR=$$(pwd); \
echo [+] Arrêt dans $$THSF_DIR; \
kill -15 $$(cat $$THSF_DIR/thsf.pid); \ kill -15 $$(cat $$THSF_DIR/thsf.pid); \
rm thsf.pid rm thsf.pid
clean: clean:
-set -e ;\ -set -e ;\
THSF_DIR=$$(pwd); \
echo [+] Nettoyage dans $$THSF_DIR; \
rm -Rf ./build ;\ rm -Rf ./build ;\
rm -Rf ./src/thsf.egg-info; \ rm -Rf ./src/thsf.egg-info; \
. thsf_venv/bin/activate; \ . thsf_venv/bin/activate; \