Making Gunicorn configurable

This commit is contained in:
Danil Smirnov
2020-08-23 11:06:18 +00:00
parent 215fe7890e
commit 6774539d29

View File

@@ -123,6 +123,7 @@ hostname: $MM_HOSTNAME
port: $MAILMAN_REST_PORT
admin_user: $MAILMAN_REST_USER
admin_pass: $MAILMAN_REST_PASSWORD
configuration: /etc/gunicorn.cfg
[archiver.hyperkitty]
class: mailman_hyperkitty.Archiver
@@ -131,6 +132,9 @@ configuration: /etc/mailman-hyperkitty.cfg
EOF
# Generate a basic gunicorn.cfg.
echo '[gunicorn]' > /etc/gunicorn.cfg
# Generate a basic configuration to use exim
cat > /tmp/exim-mailman.cfg <<EOF
[mta]
@@ -186,6 +190,11 @@ then
cat /opt/mailman/mailman-extra.cfg >> /etc/mailman.cfg
fi
if [[ -e /opt/mailman/gunicorn-extra.cfg ]]
then
echo "Found configuration file at /opt/mailman/gunicorn-extra.cfg"
cat /opt/mailman/gunicorn-extra.cfg >> /etc/gunicorn.cfg
fi
if [[ ! -v HYPERKITTY_API_KEY ]]; then
echo "HYPERKITTY_API_KEY not defined, please set this environment variable..."