Co-authored-by: mco-system <michael.costa@mcos.nc>
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2023-04-20 15:09:57 +02:00
parent 4c32d8b7a5
commit ee43e98385
53 changed files with 2198 additions and 179 deletions

View File

@@ -1,4 +1,45 @@
.PHONY: install
.PHONY: clean distclean install run stop
install:
echo "We Make P0RN"
set -e ;\
THSF_DIR=$$(pwd); \
echo [+] Déploiement dans $$THSF_DIR; \
python3 -m venv thsf_venv; \
. thsf_venv/bin/activate; \
pip3 install -r requirements.txt ;\
pip3 install . ;\
pip3 install gunicorn; \
run:
set -e ;\
THSF_DIR=$$(pwd); \
echo [+] Démarrage dans $$THSF_DIR; \
. thsf_venv/bin/activate; \
thsf_venv/bin/gunicorn -D -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app'
debug:
set -e ;\
THSF_DIR=$$(pwd); \
echo [+] Démarrage dans $$THSF_DIR; \
. thsf_venv/bin/activate; \
thsf_venv/bin/gunicorn -p thsf.pid -w 4 -b 127.0.0.1:8042 'thsf:app'
stop:
-set -e;\
THSF_DIR=$$(pwd); \
echo [+] Arrêt dans $$THSF_DIR; \
kill -15 $$(cat $$THSF_DIR/thsf.pid); \
rm thsf.pid
clean:
-set -e ;\
THSF_DIR=$$(pwd); \
echo [+] Nettoyage dans $$THSF_DIR; \
rm -Rf ./build ./src/thsf.egg-info ./thsf.pid ./thsf.log; \
. thsf_venv/bin/activate; \
pip3 uninstall thsf -y
distclean: clean
rm -Rf thsf_venv/
all: stop clean install run