Skip to content

Commit 6570f6c

Browse files
committed
updated readme to reflect .env and testing changes
1 parent a33b6a5 commit 6570f6c

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.rst

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,31 @@ A `RESTful <https://en.wikipedia.org/wiki/Representational_state_transfer>`_ API
66
Getting Started
77
---------------
88

9-
To run this project, you will need to install `Docker <https://docs.docker.com/>`_ on your machine.
109

11-
Once Docker is installed and running, enter the following command from within the project folder to start the web and database servers:
10+
11+
First create a `.env` file in the root directory that contains necessary environment variables:
12+
13+
.. code::
14+
15+
# python/django
16+
PYTHONUNBUFFERED=1
17+
DJANGO_SETTINGS_MODULE=api.config.settings
18+
SECRET_KEY=**Django Secret Key**
19+
DEBUG=True
20+
21+
# database
22+
DATABASE_URL=postgres://postgres@db/postgres
23+
24+
25+
To run this project, you will need to install `Docker <https://docs.docker.com/>`_ on your machine. Once Docker is installed and running and your `.env` file is defined, enter the following command from within the
26+
project folder to start the web and database servers:
1227

1328
.. code::
1429
1530
docker-compose up
1631
17-
This will take several minutes the first time you run it as it needs to download and install all the necessary components into a docker container.
32+
This will take several minutes the first time you run it as it needs to download and install all the necessary
33+
components into a docker container.
1834

1935
If successful, you should see the following messages at the end of the installation and configuration:
2036

@@ -32,4 +48,16 @@ On OS X, you may need to use the IP address of your docker virtual machine rathe
3248
3349
docker-machine ip default
3450
35-
If you installed the Kitematic tool, you should also see your new containers in its list and you can start and stop them from there rather than the command line from now on.
51+
If you installed the Kitematic tool, you should also see your new containers in its list and you can start and stop them
52+
from there rather than the command line from now on.
53+
54+
55+
Running Tests
56+
-------------
57+
58+
Make sure you have created a .env file as above. To run all tests:
59+
60+
.. code::
61+
62+
python manage.py test --settings=api.config.test_settings
63+

0 commit comments

Comments
 (0)