Merge branch 'master' of github.com:modoboa/modoboa

This commit is contained in:
Antoine Nguyen
2020-10-21 19:23:37 +02:00
4 changed files with 15 additions and 13 deletions
+11 -9
View File
@@ -1,21 +1,23 @@
FROM python:3.6-alpine as base
MAINTAINER Antoine Nguyen <tonio@ngyn.org>
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apk add --update openssl python3-dev libffi-dev gcc musl-dev libxml2-dev libxslt-dev \
libressl-dev jpeg-dev \
FROM base as build
RUN apk add --update openssl librrd python3-dev libffi-dev gcc musl-dev libxml2-dev libxslt-dev \
libressl-dev jpeg-dev rrdtool-dev file make \
&& rm -rf /var/cache/apk/*
RUN python3 -m venv $VIRTUAL_ENV
WORKDIR /tmp
COPY requirements.txt /tmp
COPY test-requirements.txt /tmp
RUN pip install --user -r requirements.txt --user -r test-requirements.txt
RUN pip install -r requirements.txt -r test-requirements.txt
FROM python:3.6-alpine
COPY --from=base /root/.local /root/.local
ENV PATH=/root/.local/bin:$PATH
RUN apk add --no-cache --update libxml2-dev libxslt-dev\
FROM base as run
COPY --from=build $VIRTUAL_ENV $VIRTUAL_ENV
RUN apk add --no-cache --update librrd libxslt libjpeg libressl git rrdtool \
&& rm -rf /var/cache/apk/*
RUN mkdir /code
WORKDIR /code
+1 -1
View File
@@ -13,6 +13,6 @@ services:
PYTHONPATH: ".."
DB: "SQLITE"
DEBUG: "True"
command: sh -c "cd test_project && python3 manage.py migrate && python3 manage.py load_initial_data && python3 manage.py runserver 0:8000"
command: sh -c "python3 setup.py develop && cd test_project && python3 manage.py migrate && python3 manage.py load_initial_data && python3 manage.py runserver 0:8000"
volumes:
- .:/code
+1 -1
View File
@@ -11,7 +11,7 @@ dj-database-url
djangorestframework>=3.11,<3.12
uritemplate
passlib==1.7.2
passlib~=1.7.3
bcrypt # Requires libffi-dev and python-dev
dnspython==1.16.0
+2 -2
View File
@@ -46,8 +46,8 @@ SITE_ID = 1
# Security settings
X_FRAME_OPTIONS = "SAMEORIGIN"
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
# Application definition