hashmaths / jeeves

An IRC bot written in Node.
MIT License
3 stars 1 forks source link

Add Postgres support #9

Closed wridgers closed 6 years ago

wridgers commented 6 years ago
wridgers commented 6 years ago

I personally prefer passing environment variables to the docker container than volume mounting a configuration file.

wridgers commented 6 years ago

@nullren I've done the most I'm probably gonna do today if you fancy finishing it off

nullren commented 6 years ago

I just want to make sure everything works independently of each other, for example being able to run from npm directly, run from docker, and run from docker compose.

Also, being able to swap out psql for anything else would probably be a good thing since postgres is really overkill for our use lol. Like we should not have any problems swapping out psql for sqlite or even probably just serializing a json list to a file.

I didn't do it in this last commit, but I'm probably going to generalize the config a little bit so we can use environment variables or config files. I would like to use jeeves separately and just run it easily from npm.

wridgers commented 6 years ago

nice! we could probably add an integration test for being able to connect to irc too

wridgers commented 6 years ago

Not sure how the migration code works. afaiu it should work like this:

This way there is a mechanism to make changes to the database schema (add tables/columns, drop columns, etc).

wridgers commented 6 years ago

Also, being able to swap out psql for anything else would probably be a good thing since postgres is really overkill for our use lol. Like we should not have any problems swapping out psql for sqlite or even probably just serializing a json list to a file.

Why would we ever do this? Docker makes it really easy to run postgres, and being able to run real SQL is too useful.

nullren commented 6 years ago

Is this pr... alive?