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:
@@ -49,7 +49,7 @@ workflows:
|
|||||||
scheduled-workflow:
|
scheduled-workflow:
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
cron: "@weekly"
|
cron: "0 0 * * *"
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM python:2.7-alpine3.6
|
FROM python:3.6-alpine3.6
|
||||||
|
|
||||||
MAINTAINER Abhilash Raj
|
MAINTAINER Abhilash Raj
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function wait_for_postgres () {
|
|||||||
|
|
||||||
function wait_for_mysql () {
|
function wait_for_mysql () {
|
||||||
# Check if MySQL is up and accepting connections.
|
# 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
|
until mysqladmin ping --host "$HOSTNAME" --silent; do
|
||||||
>&2 echo "MySQL is unavailable - sleeping"
|
>&2 echo "MySQL is unavailable - sleeping"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ INSTALLED_APPS = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
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',
|
||||||
|
|||||||
Reference in New Issue
Block a user