diff --git a/Dockerfile b/Dockerfile index b5edd9bf9..64208fe1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,13 +28,17 @@ RUN pip install -r /var/interlegis/sapl/requirements/requirements.txt --upgrade rm -r /root/.cache && \ rm -r /tmp/* +COPY config/env_dockerfile /var/interlegis/sapl/sapl/.env + RUN python3 manage.py bower install -- --allow-root && \ - python3 manage.py collectstatic --no-input + python3 manage.py collectstatic --no-input && \ + rm -rf /var/interlegis/sapl/sapl/.env && \ + rm -rf /var/interlegis/sapl/sapl.db RUN chmod +x /var/interlegis/sapl/start.sh && \ ln -sf /dev/stdout /var/log/nginx/access.log && \ ln -sf /dev/stderr /var/log/nginx/error.log -VOLUME ["/var/interlegis/sapl/data", "/var/interlegis/sapl/media", "/var/interlegis/sapl/collected_static"] +VOLUME ["/var/interlegis/sapl/data", "/var/interlegis/sapl/media"] CMD ["/var/interlegis/sapl/start.sh"] diff --git a/config/env_dockerfile b/config/env_dockerfile new file mode 100644 index 000000000..c83fc88f1 --- /dev/null +++ b/config/env_dockerfile @@ -0,0 +1,8 @@ +DATABASE_URL = sqlite:///sapl.db +SECRET_KEY = 'Dockerfile_Key' +DEBUG = False +EMAIL_USE_TLS = True +EMAIL_PORT = 587 +EMAIL_HOST = '' +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = ''