Skip to content

Docker-Compose template for orchestrating a Flask app with a Celery queue using Redis, added hot code-reloading enabling seamless development.

Notifications You must be signed in to change notification settings

dlesz/docker-flask-celery-redis-hotcode

 
 

Repository files navigation

Build Status

Docker Flask Celery Redis + Hot code reloading for development purpose

A basic Docker Compose template for orchestrating a Flask application & a Celery queue with Redis

Installation

git clone https://github.com/mattkohl/docker-flask-celery-redis

Build & Launch

docker-compose up -d --build

Hot code reloading - development mode

docker-compose -f docker-compose.yml -f docker-compose.development.yml up --build

This will expose the Flask application's endpoints on port 5001 as well as a Flower server for monitoring workers on port 5555

To add more workers:

docker-compose up -d --scale worker=5 --no-recreate

To shut down:

docker-compose down

To change the endpoints, update the code in api/app.py

Task changes should happen in queue/tasks.py


adapted from https://github.com/itsrifat/flask-celery-docker-scale

About

Docker-Compose template for orchestrating a Flask app with a Celery queue using Redis, added hot code-reloading enabling seamless development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 69.5%
  • Dockerfile 30.5%