From b0161d0d23eda4b44113148828daac3be0d9c70c Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Wed, 20 Mar 2024 22:37:54 +0100 Subject: [PATCH] Change: Celery app name --- archivist/core/celery.py | 2 +- docker-compose-dev.yml | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/archivist/core/celery.py b/archivist/core/celery.py index 798493d..fed80ab 100644 --- a/archivist/core/celery.py +++ b/archivist/core/celery.py @@ -7,7 +7,7 @@ from celery import Celery # Set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') -app = Celery('core') +app = Celery('archivist') # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 23b4ac0..1144f78 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -4,7 +4,7 @@ services: django: build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile-Dev args: - USER_ID=1000 image: git.aroy-art.com/aroy/gallery-archivist:dev @@ -31,7 +31,7 @@ services: #container_name: celery_worker command: > sh -c "cd archivist - && celery -A core worker -l INFO" + && celery -A archivist worker -l INFO" volumes: - .:/app/ environment: @@ -43,11 +43,10 @@ services: - redis celery-beat: - #build: . image: git.aroy-art.com/aroy/gallery-archivist:dev command: > sh -c "cd archivist - && celery -A core beat -l INFO" + && celery -A archivist beat -l INFO" volumes: - .:/app/ environment: @@ -58,5 +57,22 @@ services: - django - redis + flower: + image: git.aroy-art.com/aroy/gallery-archivist:dev + command: > + sh -c "cd archivist + && celery -A archivist flower" + volumes: + - .:/app/ + environment: + - DEBUG=1 + - CELERY_BROKER=redis://redis:6379/0 + ports: + - 5555:5555 + depends_on: + - django + - redis + + redis: image: "redis:alpine"