Skip to content

Sample Flask project with redis queue and a logger

Notifications You must be signed in to change notification settings

gu1lhem/sample-flask-rq

Repository files navigation

sample-flask-rq

Sample Flask project with redis queue and a logger. Written from this tutorial and this StackOverflow thread.

Installation

Create a simple Heroku app.

Define SONAR_TOKEN for the CI, and HEROKU_API_KEY, HEROKU_APP_NAME and HEROKU_EMAIL in the repo's secrets for the CD.

Install Redis To Go to the app.

Clone, crete a virtual environment and install the dependencies.

python3 -m venv env
. env/bin/activate
pip install wheel setuptools
pip install -r requirements.txt

For development, create .env file from .env.sample and configure it

cp .env.sample

The environment variable REDISTOGO_URL is automatically set up by Heroku when getting the add-on.

TODO

https://stackoverflow.com/questions/39924325/redis-management-on-heroku or https://elements.heroku.com/addons/heroku-redis (the fre-tier of the second is better but I am currently using Redis to go).

About

Sample Flask project with redis queue and a logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages