DefiantLabs / cosmos-upgrades

a tool to search for scheduled cosmos upgrades
MIT License
4 stars 2 forks source link

Feat/production ready build #26

Closed pharr117 closed 11 months ago

pharr117 commented 11 months ago

This PR adds a bit of code organization and features to do the following:

  1. Add argparse usage to define three app subcommands: debug, reader, writer
  2. Add different app run modes for the three subcommands:
    • python app.py debug: runs the application the same as it has been running
    • python app.py reader: runs the Flask application only with a FileSystem cache that Flask reads data from
    • python app.py writer: runs just the data update cycle with a FileSystem cache that the process writes to
  3. Move Flask app building into Factory functions, which will provide gunicorn with a Flask app to get

This also adds a docker-compose.yaml file with:

  1. Two services, one for a gunicorn build running the Flask reader process and one for the data writer
  2. A shared volume that the cache location is pointing to, allowing the systems to use the same FS cache for reading and writing
pharr117 commented 11 months ago

Closing this for now, we are exploring a more robust data store implementation.