bounca/images/bounca/root/usr/local/bin/bounca

23 lines
533 B
Bash
Executable File

#!/bin/sh
set -euo pipefail
source /opt/bounca/venv/bin/activate
if [ "${BOUNCA_MODE}" = "all-in-one" ]; then
exec minit
elif [ "${BOUNCA_MODE}" = "server" ]; then
exec gunicorn \
--bind=unix:/alloc/data/bounca.sock \
--threads=4 \
--max-requests=10000 \
bounca.wsgi:application
elif [ "${BOUNCA_MODE}" = "front" ]; then
exec nginx -c /tmp/nginx.conf
elif [ "${BOUNCA_MODE}" = "public-exporter" ]; then
exec bounca-pub-export 300
else
echo "unknown mode (${BOUNCA_MODE})"
exit 1
fi