dadbot
dadbot copied to clipboard
Configurable db connection
- Reads DB_NAME, DB_HOST, and DB_PORT from environment variables, uses current defaults if they're not specified.
- Catch and log a few errors I encountered while trying to get this running.
My motivation for this, by the way, is that it allows me to use the postgres docker image with its auto-configuration of a single database, instead of manually creating a database. This is also required if you want to move the database to a different server (which, for a bot in this many servers, might be very desirable).
It also is extremely useful if you want to dockerize this app, which is exactly what I'm going to do next :stuck_out_tongue_winking_eye: