Improved dockerfile, config file usage and documentation

This commit is contained in:
Raphael Michel
2015-05-16 00:56:09 +02:00
parent 2a6b1b7b56
commit 62b5d1c6eb
10 changed files with 222 additions and 63 deletions

View File

@@ -2,7 +2,7 @@ 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 zlib1g-dev libssl-dev npm gettext \
build-essential python3-dev zlib1g-dev libssl-dev npm gettext git \
--no-install-recommends
WORKDIR /
@@ -20,16 +20,18 @@ 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 git clone --recursive --depth 1 https://github.com/pretix/pretix.git /pretix
WORKDIR /pretix/src
RUN pip3 install -r requirements.txt
RUN pip3 install gunicorn
ADD local_settings.py /src/pretix/local_settings.py
RUN make production
RUN mkdir /etc/pretix
RUN mkdir /data
VOLUME /etc/pretix
EXPOSE 80
CMD ["/usr/bin/supervisord"]

View File

@@ -1,2 +1,3 @@
main:
tar ch --exclude=_static --exclude=htmlcov --exclude=db.sqlite3 . | docker build -t test -
#tar ch --exclude=_static --exclude=htmlcov --exclude=db.sqlite3 . |
docker build -t raphaelm/pretix-standalone .

View File

@@ -1,6 +1,7 @@
#!/bin/bash
cd /src
cd /pretix/src
export DJANGO_SETTINGS_MODULE=pretix.settings
export MEDIA_ROOT=/data/
gunicorn \
-b '0.0.0.0:80' \
-w 3 --max-requests 1000 --max-requests-jitter 50 \

View File

@@ -1,5 +0,0 @@
COMPRESS_OFFLINE = True
COMPRESS_ENABLED = True
#DEBUG = False
#TEMPLATE_DEBUG = False

View File

@@ -1 +0,0 @@
../../../src