mirror of
https://github.com/pretix/pretix.git
synced 2026-08-12 11:07:02 +00:00
First dockerfile attempt
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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
|
||||
|
||||
RUN dpkg-reconfigure locales && \
|
||||
locale-gen C.UTF-8 && \
|
||||
/usr/sbin/update-locale LANG=C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
||||
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
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
main:
|
||||
tar ch --exclude=_static --exclude=htmlcov --exclude=db.sqlite3 . | docker build -t test -
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd /src
|
||||
export DJANGO_SETTINGS_MODULE=pretix.settings
|
||||
gunicorn \
|
||||
-b '0.0.0.0:80' \
|
||||
-w 3 --max-requests 1000 --max-requests-jitter 50 \
|
||||
pretix.wsgi
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../../src
|
||||
@@ -0,0 +1,5 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:gunicorn]
|
||||
command=/bin/bash gunicorn_starter.bash
|
||||
Reference in New Issue
Block a user