Postorius (#241)
* Remove the secret key. * Use the latest tag for postorius. * Use the latest django-mailman3 that supports Python 3. * Use minimum version on Django-mailman3. * Fix import errors.
This commit is contained in:
@@ -16,8 +16,7 @@ RUN set -ex \
|
|||||||
&& apk add --no-cache --virtual .mailman-rundeps bash \
|
&& apk add --no-cache --virtual .mailman-rundeps bash \
|
||||||
postgresql-client mysql-client py-mysqldb curl mailcap \
|
postgresql-client mysql-client py-mysqldb curl mailcap \
|
||||||
&& pip install -U Django>=1.11 pip \
|
&& pip install -U Django>=1.11 pip \
|
||||||
&& pip install postorius>=1.2.0a1 \
|
&& pip install postorius==1.2.0a1 \
|
||||||
django-mailman3>=1.2.0a2 \
|
|
||||||
uwsgi \
|
uwsgi \
|
||||||
psycopg2 \
|
psycopg2 \
|
||||||
dj-database-url \
|
dj-database-url \
|
||||||
|
|||||||
@@ -58,13 +58,12 @@ ALLOWED_HOSTS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# Try to get the address of Mailman Core automatically.
|
# Try to get the address of Mailman Core automatically.
|
||||||
MAILMAN_HOST_IP_AUTO = socket.gethostbyname('mailman-core')
|
|
||||||
|
|
||||||
# Mailman API credentials
|
# Mailman API credentials
|
||||||
MAILMAN_REST_API_URL = os.environ.get('MAILMAN_REST_URL', 'http://mailman-core:8001')
|
MAILMAN_REST_API_URL = os.environ.get('MAILMAN_REST_URL', 'http://mailman-core:8001')
|
||||||
MAILMAN_REST_API_USER = os.environ.get('MAILMAN_REST_USER', 'restadmin')
|
MAILMAN_REST_API_USER = os.environ.get('MAILMAN_REST_USER', 'restadmin')
|
||||||
MAILMAN_REST_API_PASS = os.environ.get('MAILMAN_REST_PASSWORD', 'restpass')
|
MAILMAN_REST_API_PASS = os.environ.get('MAILMAN_REST_PASSWORD', 'restpass')
|
||||||
MAILMAN_ARCHIVER_FROM = (MAILMAN_HOST_IP_AUTO, os.environ.get('MAILMAN_HOST_IP', '172.19.199.2'))
|
MAILMAN_ARCHIVER_FROM = os.environ.get('MAILMAN_HOST_IP', '172.19.199.2')
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
@@ -92,7 +91,7 @@ INSTALLED_APPS = (
|
|||||||
'allauth.socialaccount.providers.google',
|
'allauth.socialaccount.providers.google',
|
||||||
)
|
)
|
||||||
|
|
||||||
_MIDDLEWARE = (
|
MIDDLEWARE = (
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
@@ -106,17 +105,8 @@ _MIDDLEWARE = (
|
|||||||
'postorius.middleware.PostoriusMiddleware',
|
'postorius.middleware.PostoriusMiddleware',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Use old-style Middleware class in Python 2 and released versions of
|
|
||||||
# Django-mailman3 don't support new style middlewares.
|
|
||||||
|
|
||||||
if sys.version_info < (3, 0):
|
|
||||||
MIDDLEWARE_CLASSES = _MIDDLEWARE
|
|
||||||
else:
|
|
||||||
MIDDLEWARE = _MIDDLEWARE
|
|
||||||
|
|
||||||
ROOT_URLCONF = 'urls'
|
ROOT_URLCONF = 'urls'
|
||||||
|
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
# Postorius. If not, see <http://www.gnu.org/licenses/>.
|
# Postorius. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from django.conf.urls import include, url, reverse_lazy
|
from django.conf.urls import include, url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.urls import reverse_lazy
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|||||||
Reference in New Issue
Block a user