dadbot icon indicating copy to clipboard operation
dadbot copied to clipboard

Configurable db connection

Open Foxite opened this issue 1 year ago • 1 comments

  • 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.

Foxite avatar Jul 11 '23 17:07 Foxite

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:

Foxite avatar Jul 11 '23 17:07 Foxite