Skip to content

Commit 730a662

Browse files
Merge pull request open5e#571 from open5e/409-how-to-build-and-self-host
Address self-hosting.
2 parents 5bc2e18 + 0968bea commit 730a662

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ Run the server locally. This server is only for development and shall __not__ be
101101
pipenv run python manage.py runserver
102102
```
103103

104-
If you need to run the server on another port, add the port number as an argument.
104+
### Self-hosting
105+
If you would like to host the API yourself locally, we suggest using gunicorn as your wsgi server. Below is an equivalent command to what we use in production, which makes the server available at `http://localhost:8888`.
105106

106107
```bash
107-
pipenv run python manage.py runserver $PORT
108+
gunicorn -b :8888 server.wsgi:application
108109
```
109110

111+
You can use our Dockerfile as inspiration, but it likely will not work without significant edits to your operating environment. We have customized our production environment to use it.
110112

111113
## Building the OAS file
112114

docs/v2/data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ The actual data.
1616
> /data/v2/{publisher-key}/{document-key}/{model-name}.json.
1717
1818
## Keys
19-
Documents when onboarded are given a short key. To allow for data to be presented in the same views, even with conflicting data names, we by convention choose the keys of an individual data item to be <slugified-name>-<document-pk>, which should be unique in all cases.
19+
Documents when onboarded are given a short key. To allow for data to be presented in the same views, even with conflicting data names, we by convention choose the keys of an individual data item to be <document-key>_<slugified-name>, or for child objects, such as CreatureActions, <document-key>_<slugified-parent-name>_<slugified-name> which should be unique per object all cases. The only violation of this rule is on legendary actions, which are also CreatureActions, so Legendary Bite can be distinct from Bite.
2020

2121
**Examples:**
22-
> magic-missile-srd - The original Magic Missile, from Wizard's of the Coast's Systems Reference Document (srd)
22+
> srd_magic-missile - The original Magic Missile, from Wizard's of the Coast's Systems Reference Document (srd)
2323
>
24-
> acolyte-a5e-ag - The Acolyte Background, from Advanced 5e's Adventurer's Guide (a5e-ag).
24+
> a5e-ag_acolyte - The Acolyte Background, from Advanced 5e's Adventurer's Guide (a5e-ag).

0 commit comments

Comments
 (0)