Genki is the web service component of rosetta, a Discord bot for visual novels playthrough servers. It is built with Django and tailwindcss.
You need Python 3.8 installed.
- Install poetry.
- Run
poetry install
. - Run
poetry run python manage.py migrate
- Run
export $(cat .env | xargs) && poetry run python manage.py runserver
Run poetry run python manage.py tailwind build
.
- Create an
.env
file with:
GENKI_SECRET
: The secret key.GENKI_ALLOWED_HOSTS
: The allowed hosts (comma separated).DISCORD_CLIENT_ID
: The Discord app ID.DISCORD_CLIENT_SECRET
: The Discord app Secret.GENKI_DB_USER
: The database username for genki.GENKI_DB_PASSWORD
: The database password for genki.GENKI_DB_HOST
: The hostname of the PostgreSQL instance (for pointing to localhost outside of docker, usehost.docker.internal
if you're using Docker Desktop, or (probably, check withifconfig
)172.17.0.1
on Linux).GENKI_DB_PORT
: The port the PostgreSQL instance is running on (5432 by default).- (Optional)
GENKI_HTTPS
: If serving over HTTPS.
- Build the images with
docker-compose build
. - Create the
genki_media
volume withdocker volume create genki_media
. - Run the images.
- If you want to also run a database instance, run:
And add the following to your .env file:
docker-compose -f docker-compose.yml -f docker-compose.db.yml up
POSTGRES_USER
: Same asGENKI_DB_USER
.POSTGRES_PASSWORD
: Same asGENKI_DBPASSWORD
.POSTGRESS_DB
:genki
.
- If you are using another PostgreSQL instance, then just run:
docker-compose up