Unverified Commit fe69674c authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Don't install dev-requirements into release builds

parent 80d4149e
......@@ -2,6 +2,9 @@ FROM python:3.5
MAINTAINER Thom Wiggers <thom@thomwiggers.nl>
LABEL description="Contains the Thaliawebsite Django application"
# Arguments
ARG install_dev_requirements=1
# Try to keep static operation on top to maximise Docker cache utilisation
# Disable output buffering
......@@ -41,9 +44,13 @@ COPY docs/requirements.txt /usr/src/app/docs/
RUN pip install --no-cache-dir \
-r requirements.txt \
-r production-requirements.txt \
-r dev-requirements.txt \
-r ../docs/requirements.txt
RUN if [ "$install_dev_requirements" -eq 1 ]; then \
pip install --no-cache-dir -r dev-requirements.txt; \
fi
# Create entry points
COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY resources/entrypoint_production.sh /usr/local/bin/entrypoint_production.sh
......@@ -59,3 +66,5 @@ COPY docs /usr/src/app/docs
# Cache docs between builds if not mounting to FS
VOLUME /concrexit/docs
RUN echo "Don't build releases without release.sh!"
......@@ -72,7 +72,7 @@ fi
docker_tag="registry.gitlab.com/thaliawww/concrexit:$version"
docker build --pull -t "$docker_tag" .
docker build --build-arg install_dev_requirements=0 --pull -t "$docker_tag" .
if yesno "Do you want to push the container?"; then
docker push "$docker_tag"
......
......@@ -17,8 +17,6 @@ from django.utils.log import DEFAULT_LOGGING
from . import settings
INSTALLED_APPS = settings.INSTALLED_APPS
if 'django_template_check' in INSTALLED_APPS:
INSTALLED_APPS.remove('django_template_check')
INSTALLED_APPS.append('django_slack')
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment