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.md
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,44 @@ The mascot for the backend API is Kirovy, by [Direct & Dominate](https://www.you
13
13
14
14

15
15
16
-
# Development
16
+
# Getting started
17
17
18
-
## Frontend devs
18
+
## Development
19
19
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.
21
21
22
-
This will launch the database, run the migrations, and start the django web server.
22
+
### Prerequisites
23
23
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).
25
26
26
-
## Backend devs
27
+
- Docker with compose
28
+
- An IDE (PyCharm strongly recommended)
27
29
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.
0 commit comments