Several change to mailman-web image.
- Download source code as zip from gitlab instead of git+https because speed. - Check if the $DATABASE_URL is not defined, use a default sqlite database. - Use dj-database-url package to set database in django settings using DATABASE_URL environment variable. - Use UWSGI_LOG_URL as the URL for UWSGI logging and set it to a default value if it has not been defined.
This commit is contained in:
@@ -141,30 +141,8 @@ WSGI_APPLICATION = 'wsgi.application'
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
#'default': {
|
||||
# Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
||||
#'ENGINE': 'django.db.backends.sqlite3',
|
||||
# DB name or path to database file if using sqlite3.
|
||||
#'NAME': '/opt/mailman-web-data/mailmansuite.db',
|
||||
# The following settings are not used with sqlite3:
|
||||
#'USER': 'mailmansuite',
|
||||
#'PASSWORD': 'mmpass',
|
||||
# HOST: empty for localhost through domain sockets or '127.0.0.1' for
|
||||
# localhost through TCP.
|
||||
#'HOST': '',
|
||||
# PORT: set to empty string for default.
|
||||
#'PORT': '',
|
||||
#}
|
||||
# Example for PostgreSQL (recommanded for production):
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'mailmandb',
|
||||
'USER': 'mailman',
|
||||
'PASSWORD': 'mailmanpass',
|
||||
'HOST': 'database',
|
||||
}
|
||||
}
|
||||
|
||||
DATABASES['default'] = dj-database-url.config(conn_max_age=600)
|
||||
|
||||
|
||||
# If you're behind a proxy, use the X-Forwarded-Host header
|
||||
|
||||
Reference in New Issue
Block a user