g0v / vaccinate

vaxx.tw is a tool to find COVID-19 Vaccine Appointments near you
http://vaxx.tw
MIT License
33 stars 20 forks source link

Containerization for web server and scraper #55

Closed yorkxin closed 3 years ago

yorkxin commented 3 years ago

This is the first step to continuously deployment.

This patch introduces two Dockerfiles:

They both have to connect to a shared Redis server.

This patch also introduces a local docker-compose.yml for development. The existing code connects to Redis using TLS, however this is very hard and probably unnecessary for local development, so I introduced an env var REDIS_SSL=no to disable it (defaults to yes means using SSL)

The next step after this is to deploy web server using a Docker image. This will involve GitHub Actions -> Docker Hub Registry -> Digital Ocean Deployment.

Note that due to my lack of knowledge in Flask I was unable to dismiss the following message. Please feel free to fix it or let me know what's the proper way to run a Python web server:

web_1      |  * Environment: production
web_1      |    WARNING: This is a development server. Do not use it in a production deployment.
web_1      |    Use a production WSGI server instead.
web_1      |  * Debug mode: on
web_1      |  * Running on all addresses.
web_1      |    WARNING: This is a development server. Do not use it in a production deployment.
yorkxin commented 3 years ago

Close in favor of #71.