File tree 3 files changed +13
-13
lines changed
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
FROM debian:jessie
2
2
MAINTAINER Matt Bentley <
[email protected] >
3
- RUN (echo "deb http://http.debian.net/debian/ jessie main contrib non-free" > /etc/apt/sources.list && echo "deb http://http.debian.net/debian/ jessie-updates main contrib non-free" >> /etc/apt/sources.list && echo "deb http://security.debian.org/ jessie/updates main contrib non-free" >> /etc/apt/sources.list)
4
- RUN apt-get update
5
3
6
- RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git python python-dev python-setuptools nginx sqlite3 supervisor
7
- RUN easy_install pip
8
- RUN pip install uwsgi
4
+ RUN (apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git python python-dev python-setuptools nginx sqlite3 supervisor)
5
+ RUN ( easy_install pip &&\
6
+ pip install uwsgi)
9
7
10
8
ADD . /opt/django/
11
9
12
- RUN echo "daemon off;" >> /etc/nginx/nginx.conf
13
- RUN rm /etc/nginx/sites-enabled/default
14
- RUN ln -s /opt/django/django.conf /etc/nginx/sites-enabled/
15
- RUN ln -s /opt/django/supervisord.conf /etc/supervisor/conf.d/
10
+ RUN ( echo "daemon off;" >> /etc/nginx/nginx.conf &&\
11
+ rm /etc/nginx/sites-enabled/default &&\
12
+ ln -s /opt/django/django.conf /etc/nginx/sites-enabled/ &&\
13
+ ln -s /opt/django/supervisord.conf /etc/supervisor/conf.d/)
16
14
17
15
RUN pip install -r /opt/django/app/requirements.txt
18
16
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ mbentley/django-uwsgi-nginx
2
2
==================
3
3
4
4
docker image for django (uwsgi) & nginx
5
- based off of stackbrew/ debian: jessie
5
+ based off of debian: jessie
6
6
7
7
To pull this image:
8
8
` docker pull mbentley/django-uwsgi-nginx `
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+
3
5
MODULE=${MODULE:- website}
4
6
5
7
sed -i " s#module=website.wsgi:application#module=${MODULE} .wsgi:application#g" /opt/django/uwsgi.ini
6
8
7
9
if [ ! -f " /opt/django/app/manage.py" ]
8
10
then
9
- echo " creating basic django project (module: ${MODULE} )"
10
- django-admin.py startproject ${MODULE} /opt/django/app/
11
+ echo " creating basic django project (module: ${MODULE} )"
12
+ django-admin.py startproject ${MODULE} /opt/django/app/
11
13
fi
12
14
13
- /usr/bin/supervisord
15
+ exec /usr/bin/supervisord
You can’t perform that action at this time.
0 commit comments