A Discord Bot for taking requests and a Django admin UI for managing their status.
Tasklog runs off of a docker-compose.yml and can be launched via docker-compose up --build -d
Before each service can run you will need to ensure the expected files are created and in their expected locations.
Requires a bot to be created, and a token See requirements.txt for full list of dependencies.
The bot takes in requests via the: !request
prefix* - the prefix(es) can be configured in the tasklog.cfg
Making a request
!request [type] [body]
- this will categorize the request by type and capture the rest of the message body.
User Commands
!request help
- show usage information
!request queue
- show current requests in the queue
!request list [completed]
- list your requests, completed
option will show the completed requests
A complete list of commands can be found at the top of the taskbot.py file
- secrets/tasklog.cfg - a filled out copy of the tasklog.cfg (see taskbot.py for required values)
Flask UI for managing tasks. See requirements.txt for full list of dependencies.
Right now you can only mark tasks as complete
As of this commit to access navigate to: http://localhost:5000/ to open the main portal
To view open tasks by type you can navigate to: http://localhost:5000/open/
To view previously completed tasks you can navigate to: http://localhost:5000/completed
This view is not yet complete.
- secrets/tasklog.cfg - a filled out copy of the tasklog.cfg (see taskui.py for required values)
The values for taskui
section are flask specific configurations. They will will be copied into their upper-case values
in app.config
. See flasks documentation to see what configurations can be set, they may require custom code to operate.
A postgres instance is what backs the tasklog.
The schema can be found in sql/*.sql
Changes to the database schema should occur as update statmenets in the db sql file.
To pass in update sql files you can use docker cp
to pass files into the postgres instance,
which can then be executed via \i /path/to/file.sql
.
- secrets/pgpass - password file for postgres db
To run all of the services you must create the folder secrets
and volumes
in the workding directory where you're deploying these services.
Make a copy of tasklog.cfg
and place it in secrets/
. Fill out the config.
Make a new file postgres_password
and place it in secrets/
. This password should match that in tasklog.cfg
.
Then you can run docker-compose --build -up -d
You can stop and remove everything with: docker-compose down -v --rmi=all
to make a fresh start and then clear the DB volume with sudo rm -r secrets/pgdata
If you get conflicts when restarting the postgres you can clear all the old unattached volumes with: docker volume prune
and docker rm $(docker ps -aq)
.
This project is powered by:
- docker via compose for running all the services
- postgreSQL for storage (via container image)
- nginx for webservering (wip) (via container image)
- python version 3+
- discord.py for discord integration (taskbot)
- flask for web backend/ui templating (taskui)
- psycopg2 to interface with postgreSQL