Update mailman-web to use Python 3 (For rolling releases) (#217)

* Update mailman-web to use Python 3

* Update configuration

* Python 3.6 image.

* Use alpine 3.7

* Use new style middleware

* Use alpine 3.6

* In Python 3, urlparse was renamed to urllib.parse
This commit is contained in:
Abhilash Raj
2018-03-07 23:22:47 -08:00
committed by GitHub
parent d07bdedc12
commit bfefd9fbc3
4 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ workflows:
scheduled-workflow:
triggers:
- schedule:
cron: "@weekly"
cron: "0 0 * * *"
filters:
branches:
only: master

View File

@@ -1,4 +1,4 @@
FROM python:2.7-alpine3.6
FROM python:3.6-alpine3.6
MAINTAINER Abhilash Raj

View File

@@ -16,7 +16,7 @@ function wait_for_postgres () {
function wait_for_mysql () {
# Check if MySQL is up and accepting connections.
HOSTNAME=$(python -c "from urlparse import urlparse; o = urlparse('$DATABASE_URL'); print(o.hostname);")
HOSTNAME=$(python -c "from urllib.parse import urlparse; o = urlparse('$DATABASE_URL'); print(o.hostname);")
until mysqladmin ping --host "$HOSTNAME" --silent; do
>&2 echo "MySQL is unavailable - sleeping"
sleep 1

View File

@@ -100,7 +100,7 @@ INSTALLED_APPS = (
)
MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',