forked from CGM_Public/pretix_original
First dockerfile attempt
This commit is contained in:
23
deployment/docker/standalone/Dockerfile
Normal file
23
deployment/docker/standalone/Dockerfile
Normal file
@@ -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"]
|
||||||
|
|
||||||
2
deployment/docker/standalone/Makefile
Normal file
2
deployment/docker/standalone/Makefile
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
main:
|
||||||
|
tar ch --exclude=_static --exclude=htmlcov --exclude=db.sqlite3 . | docker build -t test -
|
||||||
7
deployment/docker/standalone/gunicorn_starter.bash
Normal file
7
deployment/docker/standalone/gunicorn_starter.bash
Normal file
@@ -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
|
||||||
1
deployment/docker/standalone/src
Symbolic link
1
deployment/docker/standalone/src
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../src
|
||||||
5
deployment/docker/standalone/supervisord.conf
Normal file
5
deployment/docker/standalone/supervisord.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
|
||||||
|
[program:gunicorn]
|
||||||
|
command=/bin/bash gunicorn_starter.bash
|
||||||
Reference in New Issue
Block a user