Skip to content

Commit 491a6c1

Browse files
alexlambsonrohsyl
andauthored
chore: Improve README.md with a getting started section using docker … (#13)
* chore: Improve README.md with a getting started section using docker compose * chore: Improve README.md fixes * chore: ensure web_entry_point.sh is executable * Update README.md Signed-off-by: Alex Lambson <[email protected]> --------- Signed-off-by: Alex Lambson <[email protected]> Co-authored-by: rohsyl <[email protected]>
1 parent 0e60b5a commit 491a6c1

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,44 @@ The mascot for the backend API is Kirovy, by [Direct & Dominate](https://www.you
1313

1414
![Kirovy enjoying his job](docs/images/kirovy_direct_and_dominate.png)
1515

16-
# Development
16+
# Getting started
1717

18-
## Frontend devs
18+
## Development
1919

20-
Just set up your environment file and run `docker compose up web -d`.
20+
Follow this guide to set up the api locally for development.
2121

22-
This will launch the database, run the migrations, and start the django web server.
22+
### Prerequisites
2323

24-
[Example env file](example.env)
24+
> [!note]
25+
> By default, we are using Docker for the sake of simplicity. If you want to run the API natively, you can check out the section [Native Guide](#native-guide).
2526
26-
## Backend devs
27+
- Docker with compose
28+
- An IDE (PyCharm strongly recommended)
2729

28-
You can use docker compose if you'd like, but here are the native OS instructions.
30+
### Set up environment variables
31+
32+
You can copy `example.env` to `.env` and fill in the required values.
33+
34+
- Set `POSTGRES_PASSWORD` to a secure password.
35+
- Set `SECRET_KEY` to a secure secret key. You can use `from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())` in a python shell to generate it.
36+
- Optionally you can set `DEBUG` to `1` if needed
37+
38+
### Running the API
39+
40+
Run the following command to start the API:
41+
42+
```bash
43+
docker compose up nginx-server -d
44+
```
45+
46+
> Now you can access the API at `http://localhost`
47+
48+
## Native Guide
49+
50+
You should use docker compose, but here are the native OS instructions in case you don't want to.
51+
52+
> [!warning]
53+
> The native OS instructions will not be maintained going forward. If you notice an issue with them, please PR the fix.
2954
3055
### Linux and Mac
3156

web_entry_point.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)