@@ -16,7 +16,7 @@ RUN set -ex \
|
|||||||
&& apk add --no-cache --virtual .mailman-rundeps bash sassc \
|
&& apk add --no-cache --virtual .mailman-rundeps bash sassc \
|
||||||
postgresql-client mysql-client py3-mysqlclient curl mailcap gettext \
|
postgresql-client mysql-client py3-mysqlclient curl mailcap gettext \
|
||||||
python3 py3-pip xapian-core xapian-bindings-python3 libffi pcre-dev \
|
python3 py3-pip xapian-core xapian-bindings-python3 libffi pcre-dev \
|
||||||
&& python3 -m pip install -U 'Django<3.0' pip setuptools wheel \
|
&& python3 -m pip install -U 'Django<3.1' pip setuptools wheel \
|
||||||
&& pip install mailmanclient==3.3.2 \
|
&& pip install mailmanclient==3.3.2 \
|
||||||
postorius==1.3.4 \
|
postorius==1.3.4 \
|
||||||
hyperkitty==1.3.4 \
|
hyperkitty==1.3.4 \
|
||||||
@@ -30,6 +30,7 @@ RUN set -ex \
|
|||||||
xapian-haystack \
|
xapian-haystack \
|
||||||
django-auth-ldap \
|
django-auth-ldap \
|
||||||
python-memcached \
|
python-memcached \
|
||||||
|
diskcache \
|
||||||
&& apk del .build-deps \
|
&& apk del .build-deps \
|
||||||
&& addgroup -S mailman \
|
&& addgroup -S mailman \
|
||||||
&& adduser -S -G mailman mailman \
|
&& adduser -S -G mailman mailman \
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ RUN set -ex \
|
|||||||
xapian-haystack \
|
xapian-haystack \
|
||||||
django-auth-ldap \
|
django-auth-ldap \
|
||||||
python-memcached \
|
python-memcached \
|
||||||
&& python3 -m pip install -U 'Django<3.0' \
|
diskcache \
|
||||||
|
&& python3 -m pip install -U 'Django<3.1' \
|
||||||
&& python3 -m pip install -U \
|
&& python3 -m pip install -U \
|
||||||
git+https://gitlab.com/mailman/django-mailman3@${DJ_MM3_REF} \
|
git+https://gitlab.com/mailman/django-mailman3@${DJ_MM3_REF} \
|
||||||
&& apk del .build-deps \
|
&& apk del .build-deps \
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ ADMINS = (
|
|||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||||
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
|
# See https://docs.djangoproject.com/en/3.1/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
"localhost", # Archiving API from Mailman, keep it.
|
"localhost", # Archiving API from Mailman, keep it.
|
||||||
# "lists.your-domain.org",
|
# "lists.your-domain.org",
|
||||||
@@ -91,6 +91,7 @@ DEFAULT_APPS = [
|
|||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount',
|
||||||
]
|
]
|
||||||
|
|
||||||
MAILMAN_WEB_SOCIAL_AUTH = [
|
MAILMAN_WEB_SOCIAL_AUTH = [
|
||||||
'django_mailman3.lib.auth.fedora',
|
'django_mailman3.lib.auth.fedora',
|
||||||
'allauth.socialaccount.providers.openid',
|
'allauth.socialaccount.providers.openid',
|
||||||
@@ -143,9 +144,7 @@ WSGI_APPLICATION = 'wsgi.application'
|
|||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||||
|
# dj_database_url uses $DATABASE_URL environment variable to create a
|
||||||
|
|
||||||
# This uses $DATABASE_URL from the environment variable to create a
|
|
||||||
# django-style-config-dict.
|
# django-style-config-dict.
|
||||||
# https://github.com/kennethreitz/dj-database-url
|
# https://github.com/kennethreitz/dj-database-url
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
@@ -161,20 +160,16 @@ USE_X_FORWARDED_HOST = True
|
|||||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
'NAME':
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||||
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME':
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||||
'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME':
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||||
'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME':
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||||
'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -343,8 +338,6 @@ LOGGING = {
|
|||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
'stream': sys.stdout,
|
'stream': sys.stdout,
|
||||||
},
|
},
|
||||||
# TODO: use an environment variable $DJ_LOG_URL to configure the logging
|
|
||||||
# using an environment variable.
|
|
||||||
},
|
},
|
||||||
'loggers': {
|
'loggers': {
|
||||||
'django.request': {
|
'django.request': {
|
||||||
@@ -376,16 +369,13 @@ LOGGING = {
|
|||||||
'format': '%(levelname)s %(message)s'
|
'format': '%(levelname)s %(message)s'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
#'root': {
|
|
||||||
# 'handlers': ['file'],
|
|
||||||
# 'level': 'INFO',
|
|
||||||
#},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if os.environ.get('LOG_TO_CONSOLE') == 'yes':
|
if os.environ.get('LOG_TO_CONSOLE') == 'yes':
|
||||||
LOGGING['loggers']['django']['handlers'].append('console')
|
LOGGING['loggers']['django']['handlers'].append('console')
|
||||||
LOGGING['loggers']['django.request']['handlers'].append('console')
|
LOGGING['loggers']['django.request']['handlers'].append('console')
|
||||||
|
|
||||||
# HyperKitty-specific
|
# HyperKitty-specific
|
||||||
#
|
#
|
||||||
# Only display mailing-lists from the same virtual host as the webserver
|
# Only display mailing-lists from the same virtual host as the webserver
|
||||||
@@ -401,6 +391,16 @@ Q_CLUSTER = {
|
|||||||
|
|
||||||
POSTORIUS_TEMPLATE_BASE_URL = os.environ.get('POSTORIUS_TEMPLATE_BASE_URL', 'http://mailman-web:8000')
|
POSTORIUS_TEMPLATE_BASE_URL = os.environ.get('POSTORIUS_TEMPLATE_BASE_URL', 'http://mailman-web:8000')
|
||||||
|
|
||||||
|
CACHES = {
|
||||||
|
'default': {
|
||||||
|
'BACKEND': 'diskcache.DjangoCache',
|
||||||
|
'LOCATION': '/opt/mailman-web-data/diskcache',
|
||||||
|
'OPTIONS': {
|
||||||
|
'size_limit': 2 ** 30 # 1 gigabyte
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from settings_local import *
|
from settings_local import *
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user