diff --git a/deployment/docker/standalone/Dockerfile b/deployment/docker/standalone/Dockerfile index 6dc6f99ea..9f708d343 100644 --- a/deployment/docker/standalone/Dockerfile +++ b/deployment/docker/standalone/Dockerfile @@ -2,7 +2,13 @@ FROM debian:jessie RUN apt-get update && apt-get install -y supervisor python3 git python3-pip \ libxml2-dev libxslt1-dev python-dev python-virtualenv locales libffi-dev \ - build-essential python3-dev --no-install-recommends + build-essential python3-dev zlib1g-dev libssl-dev npm gettext \ + --no-install-recommends + +WORKDIR / +RUN npm install -g less@2.5.0 +RUN ln -s /usr/bin/nodejs /usr/bin/node +RUN ln -s /node_modules/.bin/lessc /usr/bin/lessc RUN dpkg-reconfigure locales && \ locale-gen C.UTF-8 && \ @@ -13,11 +19,17 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf ADD gunicorn_starter.bash /gunicorn_starter.bash + ADD src /src WORKDIR /src + RUN pip3 install -r requirements.txt RUN pip3 install gunicorn +ADD local_settings.py /src/pretix/local_settings.py + +RUN make production + EXPOSE 80 CMD ["/usr/bin/supervisord"] diff --git a/deployment/docker/standalone/local_settings.py b/deployment/docker/standalone/local_settings.py new file mode 100644 index 000000000..f517bed92 --- /dev/null +++ b/deployment/docker/standalone/local_settings.py @@ -0,0 +1,5 @@ +COMPRESS_OFFLINE = True +COMPRESS_ENABLED = True +#DEBUG = False +#TEMPLATE_DEBUG = False + diff --git a/deployment/docker/standalone/supervisord.conf b/deployment/docker/standalone/supervisord.conf index a8e43c721..72e2c7805 100644 --- a/deployment/docker/standalone/supervisord.conf +++ b/deployment/docker/standalone/supervisord.conf @@ -2,4 +2,4 @@ nodaemon=true [program:gunicorn] -command=/bin/bash gunicorn_starter.bash +command=/bin/bash /gunicorn_starter.bash