debate-cards
debate-cards copied to clipboard
Containerize app
Adds docker compose file for databases and node app This is my first time using docker, so there are probably simpler/better ways to do some of this Naming conventions also could probably be changed
To start the app run docker compose up tasks --build
(add -d if you don't need logs in terminal)
To start just the databases run docker compose up -d
If the prisma schema has changed run docker compose build migrate
then docker compose run --rm migrate
The first time running will be pretty slow, but after that should start in a few seconds Currently everything is designed mostly for development, things would need to be adjusted for a production environment As for running each module in its own container, since the scraper, parser ,and deduplicator will be idle a lot of the time, I think it make sense to have them all run on the same container. Once the api is added that should probably be separate
Need to add better way of having dependencies and prisma generate
output locally. Could probably be done with volumes, but there might be a better way.
Rebased to remove scraper code that doesn't work anymore. Old version is here