digitalmethodsinitiative / dmi-tcat

Digital Methods Initiative - Twitter Capture and Analysis Toolset
Apache License 2.0
366 stars 114 forks source link

Added cron to docker image #436

Closed dale-wahl closed 3 years ago

dale-wahl commented 3 years ago

This is a simple fix that installs cron to the docker image which allows the controller.php to run. I also added a blank config that a user can just add their API credentials to. It should resolve issue 433 and I believe would have helped with issue 417.

Docker caveat: Data persists within the docker image, but if that image is rebuilt, it will be lost. You can thus stop and start the container with no issues and can run and update software within the container. But if we were to make any changes to the docker image that would require it to be rebuilt, collected data would not persist.

The solution seems to be to use docker's volumes. I attempted a few ways to store the database in a volume, but could not get it to reliable persist after a rebuild. The best solution would likely be to have the database in it's own container, but that would require a bit more knowledge on how the rest of the application communicates with the database. Perhaps we can sit down and go through that at some point in the future.