forked from kencochrane/django-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3e052f
commit b9a41ca
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
supervisord -c /opt/supervisor.conf -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[program:app] | ||
priority=10 | ||
directory=/opt/apps/djdocker | ||
command=/usr/local/bin/uwsgi | ||
--http-socket 0.0.0.0:8000 | ||
-p 4 | ||
-b 32768 | ||
-T | ||
--master | ||
--max-requests 5000 | ||
-H /opt/ve/djdocker | ||
--static-map /static=/opt/apps/djdocker/static | ||
--static-map /static=/opt/ve/djdocker/lib/python2.7/site-packages/django/contrib/admin/static | ||
--module wsgi:application | ||
user=root | ||
autostart=true | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:12.10 | ||
MAINTAINER Ken Cochrane "[email protected]" | ||
RUN apt-get -qq update | ||
RUN apt-get install -y python-dev python-setuptools supervisor git-core | ||
RUN easy_install pip | ||
RUN pip install virtualenv | ||
RUN pip install uwsgi | ||
RUN virtualenv --no-site-packages /opt/ve/djdocker | ||
ADD . /opt/apps/djdocker | ||
ADD .docker/supervisor.conf /opt/supervisor.conf | ||
ADD .docker/run.sh /usr/local/bin/run | ||
RUN (cd /opt/apps/djdocker && git remote rm origin) | ||
RUN (cd /opt/apps/djdocker && git remote add origin https://github.com/kencochrane/django-docker.git) | ||
RUN /opt/ve/djdocker/bin/pip install -r /opt/apps/djdocker/requirements.txt | ||
RUN (cd /opt/apps/djdocker && /opt/ve/shipyard/bin/djdocker manage.py syncdb --noinput) | ||
|
||
EXPOSE 8000 | ||
CMD ["/bin/sh", "-e", "/usr/local/bin/run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from django_docker import wsgi | ||
application = wsgi.application |