]> git.gir.st - subscriptionfeed.git/blob - config/startup.sh
better document standalone modules
[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
11 # If you intend to run the webhooks on a different port/machine (remove otherwise):
12 PATH="$VENV_DIR/bin" gunicorn --config="$CONFIG_DIR/gunicorn-webhooks-config.py" --chdir="$MOD_DIR" --daemon 'app.webhooks:app()'
13
14 # hacky redirect to https, optional:
15 # 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