A book-keeping app for the solo-journaling RPG, Thousand Year Old Vampire.
- Docker Compose
- Yarn
- Visual Studio Code
- Python 3.9.7
$ docker-compose up --build$ docker-compose exec web python manage.py migrate
$ docker-compose exec web python manage.py createsuperuserCreate a .env file in the project root using the .env.template file.
$ cp .env.template .envCopy the environment values from the web container in docker-compose.yaml to the corresponding variables in .env.
Prepare the prompt file and then use the import_prompts command to import it into the database. See Prompt File Format for instructions on formatting the prompt file.
$ python manage.py import_prompts path/to/prompts.txt$ cd web
$ yarn startYour default web browser should open to http://localhost:3000/
IMPORTANT: Make sure to build and commit the frontend static files with yarn build prior to deploying your changes.
$ heroku login
$ heroku create <app>
$ heroku stack:set container -a <app>
$ heroku addons:create heroku-postgresql:hobby-dev -a <app>
$ heroku git:remote -a <app>
$ git push heroku mainGo to dashboard.heroku.com/apps/<app>/settings, then click "Reveal Config Vars".
Add the following config variables:
ALLOWED_HOSTS=<app>.herokuapp.comDEBUG=falseSECRET_KEY=<key>
A secret key can be generated with the following command:
$ python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'The DATABASE_URL variable should already be populated by Heroku.
$ heroku run python manage.py migrate
$ heroku run python manage.py createsuperuserYou will first need to configure .env with the values from Heroku in step 2 in order to connect to the deployed database.
$ python manage.py import_prompts path/to/prompts.txt