Skip to content

Commit

Permalink
Merge pull request #110 from ryanwilsonperkin/docker-sample-project
Browse files Browse the repository at this point in the history
Use Docker for the sample project
  • Loading branch information
mwarkentin committed Jan 5, 2018
2 parents cc3c180 + 33fd35b commit 4a70207
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 195 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python
COPY . /app
WORKDIR /app/sample_project
RUN pip install -r requirements.txt
RUN python manage.py migrate
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
18 changes: 7 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,25 +270,21 @@ Currently there is only one "paid" check - ``watchman.checks.email``. You can
enable it by setting the ``WATCHMAN_ENABLE_PAID_CHECKS`` to ``True``, or by
overriding the ``WATCHMAN_CHECKS`` setting.

Trying it out with Vagrant
Trying it out with Docker
--------------------------

A sample project is available along with a Vagrantfile to make it easy to try
A sample project is available along with a Dockerfile to make it easy to try
out django-watchman.

Requirements
************

* `Vagrant <https://www.vagrantup.com/>`_
* `Virtualbox <https://www.virtualbox.org/>`_
* `Ansible <http://www.ansible.com/>`_
* `Docker <https://www.docker.com/get-docker>`

Instructions
************

1. Launch vagrant box: ``vagrant up``
2. SSH into vagrant: ``vagrant ssh``
3. Activate the virtualenv: ``workon watchman``
4. Launch the development server: ``python manage.py runserver 0.0.0.0:8000``
5. Visit watchman json endpoint in your browser: http://127.0.0.1:8000/watchman/
6. Visit watchman dashboard in your browser: http://127.0.0.1:8000/watchman/dashboard/
1. Build the Docker image with the current local code: `docker build -t watchman .`
2. Launch the Docker image: `docker run -it -p 8000:8000 watchman`
3. Visit watchman json endpoint in your browser: http://127.0.0.1:8000/watchman/
4. Visit watchman dashboard in your browser: http://127.0.0.1:8000/watchman/dashboard/
19 changes: 0 additions & 19 deletions Vagrantfile

This file was deleted.

42 changes: 0 additions & 42 deletions provisioning/playbook.yml

This file was deleted.

122 changes: 0 additions & 122 deletions provisioning/templates/.bashrc.j2

This file was deleted.

2 changes: 1 addition & 1 deletion sample_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django<1.9

# django-watchman
-e /vagrant/
-e /app

0 comments on commit 4a70207

Please sign in to comment.