Skip to content

Commit bba62a7

Browse files
committed
docs: adds information about config files
1 parent b268e84 commit bba62a7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# codes.clj.docs.backend-malli
22
Backend Service for [docs.clj.codes](https://docs.clj.codes).
33

4+
## Config `resources/config.edn`
5+
This file has all the backend configurations:
6+
- `:webserver/port` or PORT env var which port the webserver will open and expose
7+
- `:webserver/allowed-origins` an array with allowed base domains for cors
8+
- `:database` config to build the postgres connection string:
9+
- `:dbname` or DB_NAME env var
10+
- `:username` or DB_USER env var
11+
- `:password` or DB_PASS env var
12+
- `:host` or DB_HOST env var
13+
- `:port` or DB_PORT env var
14+
- `:db-docs` coordinates to [db-docs component](src/codes/clj/docs/backend/components/db_docs.clj) downloads the latest extracted db
15+
- `:dir` where it will download and extract the database zip
16+
- `:url` base github releases url to build the download url
17+
- `:version` used to build the download url and set where inside `:dir` the database will be saved
18+
- `:file-name` used to build the download url
19+
- Note: Before downloading the component checks if the path `:dir`/`:version` exists and has the database,
20+
so you could manually copy your database files and start the server it will use this instead downloading a new one.
21+
- `:github` where to set client-id (or GH_CLIENT_ID) and client-secret (or GH_CLIENT_SECRET) for login with github
22+
- `:jwt` jwt encryption secret used to encrypt and decrypt the jwt returned to the frontend after login
23+
424
## Project
525
[Check the project backlog, issues and ongoing tasks](https://github.com/orgs/clj-codes/projects/2)
626

0 commit comments

Comments
 (0)