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.
This is the first step to continuously deployment.
This patch introduces two Dockerfiles:
docker/web/Dockerfile
= web server (front & backend)docker/scraper/Dockerfile
= scraper. (TODO: cron job)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 varREDIS_SSL=no
to disable it (defaults toyes
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: