Fix Database Url check, force mailman to start, remove security settings in
django. - -z Does not check properly if the DATABASE_URL is defined or not. It evaluates to True if it is not set or set to '' - Remove SECURE_SSL_REDIRECT in the django settings because this deployment is meant to behind Nginx which decrypts SSL packets. - Force mailman to start even with a lock. This _may_ not be the best idea but for now if everything is followed according to this guide.
This commit is contained in:
@@ -33,7 +33,7 @@ function wait_for_postgres () {
|
||||
#
|
||||
# TODO: Check the database type and detect if it is up based on that. For now,
|
||||
# assume that postgres is being used if DATABASE_URL is defined.
|
||||
if [[ -z "$DATABASES_URL" ]]; then
|
||||
if [[ ! -v "$DATABASES_URL" ]]; then
|
||||
echo "DATABASE_URL is not defined. Using sqlite database..."
|
||||
export DATABASE_URL=sqlite:///mailman.db
|
||||
export DATABASE_TYPE='sqlite'
|
||||
@@ -128,7 +128,7 @@ function term_handler () {
|
||||
trap 'kill ${!}; term_handler' SIGTERM
|
||||
|
||||
# Start the mailman server. Mailman will start the master runner and then exit.
|
||||
mailman -C /config/mailman.cfg start &
|
||||
mailman -C /config/mailman.cfg start --force &
|
||||
|
||||
# wait forever.
|
||||
while true
|
||||
|
||||
Reference in New Issue
Block a user