lttkgp / C-3PO

The metadata overlord and API server for LTTKGP
https://api.lttkgp.com
MIT License
27 stars 21 forks source link

Enable hot-reloading Docker dev setup #84

Closed ghostwriternr closed 4 years ago

ghostwriternr commented 4 years ago

Currently, during development, the Docker image needs to be rebuilt every time there is a change, which slows down testing. Hot reloading would make this a lot smoother. This is quite trivial - fun fix for first-timers. Tutorial: https://stackoverflow.com/a/44344442/4396392

malathit commented 4 years ago

Shall I take this up for Hacktoberfest?

ghostwriternr commented 4 years ago

Hi @malathit ! Sure : ) Looking forward to your PR.

malathit commented 4 years ago

Hey I just looked at the code. It looks like you are already mounting the directory to the docker container in docker-compose. I am not sure if you have enabled the debugging for the flask app. Can you be brief of what exactly to be done?

ghostwriternr commented 4 years ago

@malathit you're right indeed about the mount point. But if you try running the service locally, you can see it in itself isn't enough. Currently, the Dockerfile we use is set-up to use wsgi (which runs Flask in production mode). But during local development, we'd like to bypass wsgi and run flask in development mode.

So, this task would entail: