]> git.gir.st - subscriptionfeed.git/blob - config/startup.sh
fix loading webhooks as frontend module, simplify startup.sh
[subscriptionfeed.git] / config / startup.sh
1 #!/bin/sh
2
3 MOD_DIR=/opt/yt/
4 VENV_DIR="/opt/yt/venv/"
5 CONFIG_DIR="/opt/yt/config/"
6
7 export YT_CONFIG="$CONFIG_DIR/config.ini"
8
9 PATH="$VENV_DIR/bin" gunicorn --config="$CONFIG_DIR/gunicorn-frontend-config.py" --chdir="$MOD_DIR" --daemon app:app
10 PATH="$VENV_DIR/bin" gunicorn --config="$CONFIG_DIR/gunicorn-webhooks-config.py" --chdir="$MOD_DIR" --daemon 'app.webhooks:app()'
11
12 # hacky redirect to https, optional:
13 # nc -lkc 'read http path proto; printf "HTTP/1.1 301 Moved\\nLocation: https://localhost/%s\\n\\n" $path' >/dev/null 2>&1 80 &
Imprint / Impressum