Managed by UV
-
Fill in example.env file and rename to .env
-
Set up database with:
export DB_FILE=./db.sqlite uv run db_handler.py -
Run with
uv run main.py
-
Set up database to be volume mounted:
mkdir ./db export DB_FILE=./db/db.sqlite uv run db_handler.py chmod -R g+rw ./db -
Bind mount db.sqlite into a reasonable directory (like /app/db/db.sqlite).
-
Run with evironment variables DB_FILE set to the binded location, and TOKEN set to your discord token.
example:
podman run -it --userns=keep-id\
-e DB_FILE="/app/db/db.sqlite" \
-e TOKEN="<your token here>" \
-v ./db:/app/db\
rasa-panternyou can also use command="uv run -m db_handling.handler to create and
initialize the database, as long as your group has permissions to write to the
mounted database folder
The reason we mount a folder and not just the file is because sqlite needs to create and write to a few additional files apart from the database itself, and thus we need a folder with write access.
This is the recomended option.
-
Open the compose file and uncomment the setup command line
command: uv run -m db_handling.handler -
Fill in all environment variables in the compose file
-
Start the services with
podman compose up -
Remove the command line from the compose file
-
Start the proper Bot service with
podman compose up -d