Merge branch 'main' into fix_sqlite-url
This commit is contained in:
@@ -12,15 +12,16 @@ COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
set -ex \
|
||||
&& apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers \
|
||||
postgresql-dev mariadb-dev python3-dev libffi-dev openldap-dev cargo rust \
|
||||
postgresql-dev mariadb-dev mariadb-connector-c python3-dev libffi-dev openldap-dev cargo rust \
|
||||
&& apk add --no-cache --virtual .mailman-rundeps bash sassc \
|
||||
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 py-cryptography \
|
||||
&& python3 -m pip install -U 'Django<3.2' pip setuptools wheel \
|
||||
&& pip install mailmanclient==3.3.3 \
|
||||
postorius==1.3.6 \
|
||||
hyperkitty==1.3.5 \
|
||||
django-mailman3==1.3.7 \
|
||||
mistune==2.0.0rc1 \
|
||||
whoosh \
|
||||
uwsgi \
|
||||
'psycopg2<2.9' \
|
||||
|
||||
@@ -17,15 +17,15 @@ ARG CLIENT_REF
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
set -ex \
|
||||
&& apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers git \
|
||||
postgresql-dev mariadb-dev python3-dev libffi-dev openldap-dev cargo rust \
|
||||
postgresql-dev mariadb-dev mariadb-connector-c python3-dev libffi-dev openldap-dev cargo rust \
|
||||
&& apk add --no-cache --virtual .mailman-rundeps bash sassc pcre-dev \
|
||||
python3 py3-pip postgresql-client mysql-client py3-mysqlclient \
|
||||
curl mailcap xapian-core xapian-bindings-python3 libffi gettext \
|
||||
curl mailcap xapian-core xapian-bindings-python3 libffi gettext py-cryptography \
|
||||
&& python3 -m pip install -U pip setuptools wheel \
|
||||
&& python3 -m pip install -U \
|
||||
git+https://gitlab.com/mailman/mailmanclient@${CLIENT_REF} \
|
||||
git+https://gitlab.com/mailman/postorius@${POSTORIUS_REF} \
|
||||
git+https://gitlab.com/mailman/hyperkitty@${HYPERKITTY_REF} \
|
||||
git+https://gitlab.com/mailman/mailmanclient \
|
||||
git+https://gitlab.com/mailman/postorius \
|
||||
git+https://gitlab.com/mailman/hyperkitty \
|
||||
whoosh \
|
||||
uwsgi \
|
||||
'psycopg2<2.9' \
|
||||
@@ -38,7 +38,7 @@ RUN --mount=type=cache,target=/root/.cache \
|
||||
django-utils-six \
|
||||
&& python3 -m pip install -U 'Django<3.2' \
|
||||
&& python3 -m pip install -U \
|
||||
git+https://gitlab.com/mailman/django-mailman3@${DJ_MM3_REF} \
|
||||
git+https://gitlab.com/mailman/django-mailman3 \
|
||||
&& apk del .build-deps \
|
||||
&& addgroup -S mailman \
|
||||
&& adduser -S -G mailman mailman \
|
||||
|
||||
@@ -16,23 +16,14 @@ function wait_for_postgres () {
|
||||
|
||||
function wait_for_mysql () {
|
||||
# Check if MySQL is up and accepting connections.
|
||||
HOSTNAME=$(python3 <<EOF
|
||||
try:
|
||||
from urllib.parse import urlparse
|
||||
except ImportError:
|
||||
from urlparse import urlparse
|
||||
o = urlparse('$DATABASE_URL')
|
||||
print(o.hostname)
|
||||
EOF
|
||||
)
|
||||
until mysqladmin ping --host "$HOSTNAME" --silent; do
|
||||
readarray -d' ' -t ENDPOINT <<< $(python3 -c "from urllib.parse import urlparse; o = urlparse('$DATABASE_URL'); print('%s %s' % (o.hostname, o.port if o.port else '3306'));")
|
||||
until mysqladmin ping --host ${ENDPOINT[0]} --port ${ENDPOINT[1]} --silent; do
|
||||
>&2 echo "MySQL is unavailable - sleeping"
|
||||
sleep 1
|
||||
done
|
||||
>&2 echo "MySQL is up - continuing"
|
||||
}
|
||||
|
||||
|
||||
function check_or_create () {
|
||||
# Check if the path exists, if not, create the directory.
|
||||
if [[ ! -e dir ]]; then
|
||||
|
||||
Reference in New Issue
Block a user