This commit is contained in:
Martín Blech 2015-07-10 08:30:12 +00:00
commit 3db9391a05
5 changed files with 60 additions and 1 deletions

View File

@ -33,7 +33,7 @@ Chris Franklin
Benjamin Abel Benjamin Abel
Felipe Arruda / @arruda Felipe Arruda / @arruda
Matt Warren / @mfwarren Matt Warren / @mfwarren
Martin Blech Martin Blech / @martinblech
Andy Rose Andy Rose
Andrew Mikhnevich / @zcho Andrew Mikhnevich / @zcho
Kevin Ndung'u / @kevgathuku Kevin Ndung'u / @kevgathuku

View File

@ -150,6 +150,22 @@ To get live reloading to work you'll probably need to install an `appropriate br
.. _appropriate browser extension: http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions- .. _appropriate browser extension: http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-
**Running in an isolated Docker development environment**
If you would rather run your application inside a separate Docker environment and avoid installing Postgres or any dependencies in your host OS, you can use the included Docker Compose configuration (``Dockerfile`` and ``docker-compose.yml``).
Make sure that Docker_ is installed. In the project root run::
$ docker-compose up
.. _Docker: https://docs.docker.com/installation/
This command will download all the necessary dependencies and start your project. The first time, you will also need to run the following command to initialize the database::
$ docker-compose web python manage.py migrate
If you're on OS X or Windows, run ``boot2docker ip`` to find out Docker's IP, otherwise it's localhost. Hit ``http://<docker_host>:8000/`` with your browser and you're ready to go.
It's time to write the code!!! It's time to write the code!!!
For Readers of Two Scoops of Django 1.8 For Readers of Two Scoops of Django 1.8

View File

@ -0,0 +1,10 @@
# Only intended for development purposes.
# For production deployment options, see the Deployment section in
# README.rst
FROM python:3.4
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD . /code/
RUN pip install -r requirements/local.txt

View File

@ -108,6 +108,22 @@ To get live reloading to work you'll probably need to install an `appropriate br
.. _appropriate browser extension: http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions- .. _appropriate browser extension: http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-
**Running in an isolated Docker development environment**
If you would rather run your application inside a separate Docker environment and avoid installing Postgres or any dependencies in your host OS, you can use the included Docker Compose configuration (``Dockerfile`` and ``docker-compose.yml``).
Make sure that Docker_ is installed. In the project root run::
$ docker-compose up
.. _Docker: https://docs.docker.com/installation/
This command will download all the necessary dependencies and start your project. The first time, you will also need to run the following command to initialize the database::
$ docker-compose web python manage.py migrate
If you're on OS X or Windows, run ``boot2docker ip`` to find out Docker's IP, otherwise it's localhost. Hit ``http://<docker_host>:8000/`` with your browser and you're ready to go.
It's time to write the code!!! It's time to write the code!!!

View File

@ -0,0 +1,17 @@
# Only intended for development purposes.
# For production deployment options, see the Deployment section in
# README.rst
db:
image: postgres
web:
build: .
command: python manage.py runserver_plus 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db
environment:
- DATABASE_URL=postgres://postgres:postgres@db/postgres