Deploy: bootstrap.sh fuer ITSM-App
This commit is contained in:
parent
ee3130e641
commit
28b8b04a68
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
echo "[bootstrap-itsm] Installiere OS-Abhaengigkeiten..."
|
||||||
|
apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates >/dev/null
|
||||||
|
|
||||||
|
echo "[bootstrap-itsm] Hole ITSM-Quellcode von Gitea (git clone)..."
|
||||||
|
rm -rf /opt/itsm-src
|
||||||
|
git clone --depth 1 https://git1.mrmoe.de/mscadm/ITSM.git /opt/itsm-src >/dev/null 2>&1
|
||||||
|
|
||||||
|
echo "[bootstrap-itsm] Installiere Python-Abhaengigkeiten..."
|
||||||
|
pip install --quiet --root-user-action=ignore flask gunicorn
|
||||||
|
|
||||||
|
echo "[bootstrap-itsm] Bereite App vor..."
|
||||||
|
mkdir -p /app
|
||||||
|
cp /opt/itsm-src/app.py /app/app.py
|
||||||
|
|
||||||
|
echo "[bootstrap-itsm] Sync abgeschlossen, starte gunicorn."
|
||||||
|
cd /app
|
||||||
|
exec gunicorn -b 0.0.0.0:8090 --worker-class gthread -w 1 --threads 4 --timeout 120 app:app
|
||||||
Loading…
Reference in New Issue