You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+32-4Lines changed: 32 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,31 @@ A `RESTful <https://en.wikipedia.org/wiki/Representational_state_transfer>`_ API
6
6
Getting Started
7
7
---------------
8
8
9
-
To run this project, you will need to install `Docker <https://docs.docker.com/>`_ on your machine.
10
9
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:
12
27
13
28
.. code::
14
29
15
30
docker-compose up
16
31
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.
18
34
19
35
If successful, you should see the following messages at the end of the installation and configuration:
20
36
@@ -32,4 +48,16 @@ On OS X, you may need to use the IP address of your docker virtual machine rathe
32
48
33
49
docker-machine ip default
34
50
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
0 commit comments