Closed wridgers closed 6 years ago
I personally prefer passing environment variables to the docker container than volume mounting a configuration file.
@nullren I've done the most I'm probably gonna do today if you fancy finishing it off
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.
nice! we could probably add an integration test for being able to connect to irc too
Not sure how the migration code works. afaiu it should work like this:
migrations
table if it doesn't existmigrations/
for an ordered set of database schema changesmigrations/<migration>.sql
<migration>
is in migrations
table, continue<migration>.sql
<migration>
to migrations
tableThis way there is a mechanism to make changes to the database schema (add tables/columns, drop columns, etc).
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.
Is this pr... alive?
docker-compose.yml
for local testing