From fbe9f5874d8cb39ab806f6171cfd681eca7697c5 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 20 May 2015 18:28:54 +0200 Subject: [PATCH] We need to run compress at docker startup time as it depends on STATIC_URL :( --- deployment/docker/standalone/Dockerfile | 2 +- deployment/docker/standalone/Makefile | 2 +- deployment/docker/standalone/gunicorn_starter.bash | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deployment/docker/standalone/Dockerfile b/deployment/docker/standalone/Dockerfile index 920de70145..fa975afc01 100644 --- a/deployment/docker/standalone/Dockerfile +++ b/deployment/docker/standalone/Dockerfile @@ -29,7 +29,7 @@ RUN pip3 install -r requirements/mysql.txt RUN pip3 install -r requirements/postgres.txt RUN pip3 install gunicorn -RUN make production +RUN make RUN mkdir /etc/pretix RUN mkdir /data diff --git a/deployment/docker/standalone/Makefile b/deployment/docker/standalone/Makefile index 372b7fdbd4..a912853c55 100644 --- a/deployment/docker/standalone/Makefile +++ b/deployment/docker/standalone/Makefile @@ -1,3 +1,3 @@ main: #tar ch --exclude=_static --exclude=htmlcov --exclude=db.sqlite3 . | - docker build -t raphaelm/pretix-standalone . + docker build -t pretix/standalone . diff --git a/deployment/docker/standalone/gunicorn_starter.bash b/deployment/docker/standalone/gunicorn_starter.bash index 6e5fc5701c..225990978b 100644 --- a/deployment/docker/standalone/gunicorn_starter.bash +++ b/deployment/docker/standalone/gunicorn_starter.bash @@ -3,6 +3,7 @@ cd /pretix/src export DJANGO_SETTINGS_MODULE=pretix.settings export MEDIA_ROOT=/data/ python3 manage.py migrate +python3 manage.py compress gunicorn \ -b '0.0.0.0:80' \ -w 3 --max-requests 1000 --max-requests-jitter 50 \