mirror of
https://github.com/StanGirard/quivr.git
synced 2024-09-11 13:15:41 +03:00
feat(broker): fixed url
This commit is contained in:
parent
207aebf53d
commit
f46ad68aa4
@ -14,11 +14,11 @@ from repository.notification.update_notification import update_notification_by_i
|
||||
from utils.processors import filter_file
|
||||
|
||||
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", "")
|
||||
CELERY_BROKER_QUEUE_URL = os.getenv("CELERY_BROKER_QUEUE_URL", "")
|
||||
CELEBRY_BROKER_QUEUE_NAME = os.getenv("CELEBRY_BROKER_QUEUE_NAME", "quivr")
|
||||
|
||||
if CELERY_BROKER_URL.startswith("sqs"):
|
||||
broker_transport_options = {
|
||||
CELERY_BROKER_QUEUE_URL: {
|
||||
CELEBRY_BROKER_QUEUE_NAME: {
|
||||
"my-q": {
|
||||
"url": CELERY_BROKER_URL,
|
||||
}
|
||||
@ -30,7 +30,7 @@ if CELERY_BROKER_URL.startswith("sqs"):
|
||||
task_serializer="json",
|
||||
broker_transport_options=broker_transport_options,
|
||||
)
|
||||
celery.conf.task_default_queue = CELERY_BROKER_QUEUE_URL
|
||||
celery.conf.task_default_queue = CELEBRY_BROKER_QUEUE_NAME
|
||||
elif CELERY_BROKER_URL.startswith("redis"):
|
||||
celery = Celery(
|
||||
__name__,
|
||||
|
@ -1,19 +1,6 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.10
|
||||
command:
|
||||
- "--api.insecure=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.exposedbydefault=false"
|
||||
- "--entrypoints.web.address=:5050"
|
||||
ports:
|
||||
- "5050:5050"
|
||||
- "8080:8080" # For the Traefik dashboard (optional)
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
frontend:
|
||||
env_file:
|
||||
- ./frontend/.env
|
||||
@ -32,63 +19,50 @@ services:
|
||||
context: backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-core
|
||||
command: uvicorn main:app --reload --host 0.0.0.0 --port 5050
|
||||
restart: always
|
||||
volumes:
|
||||
- ./backend/:/code/
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.backend-core.rule=PathPrefix(`/`)"
|
||||
- "traefik.http.routers.backend-core.entrypoints=web"
|
||||
- "traefik.http.services.backend-core.loadbalancer.server.port=5050"
|
||||
|
||||
backend-chat:
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-chat
|
||||
command: uvicorn --reload chat_service:app --host 0.0.0.0 --port 5050
|
||||
depends_on:
|
||||
- redis
|
||||
- worker
|
||||
ports:
|
||||
- 5050:5050
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: redis
|
||||
restart: always
|
||||
volumes:
|
||||
- ./backend/:/code/
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.backend-chat.rule=PathPrefix(`/chat`)"
|
||||
- "traefik.http.routers.backend-chat.entrypoints=web"
|
||||
- "traefik.http.services.backend-chat.loadbalancer.server.port=5050"
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
backend-crawl:
|
||||
worker:
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-crawl
|
||||
command: uvicorn --reload crawl_service:app --host 0.0.0.0 --port 5050
|
||||
container_name: worker
|
||||
command: celery -A celery_worker worker -l info
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
volumes:
|
||||
- ./backend/:/code/
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.backend-crawl.rule=PathPrefix(`/crawl`)"
|
||||
- "traefik.http.routers.backend-crawl.entrypoints=web"
|
||||
- "traefik.http.services.backend-crawl.loadbalancer.server.port=5050"
|
||||
|
||||
backend-upload:
|
||||
|
||||
|
||||
flower:
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-upload
|
||||
command: uvicorn --reload upload_service:app --host 0.0.0.0 --port 5050
|
||||
container_name: flower
|
||||
command: celery -A celery_worker flower -l info --port=5555
|
||||
restart: always
|
||||
volumes:
|
||||
- ./backend/:/code/
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.backend-upload.rule=PathPrefix(`/upload`)"
|
||||
- "traefik.http.routers.backend-upload.entrypoints=web"
|
||||
- "traefik.http.services.backend-upload.loadbalancer.server.port=5050"
|
||||
depends_on:
|
||||
- redis
|
||||
- worker
|
||||
ports:
|
||||
- 5555:5555
|
||||
|
@ -6,7 +6,7 @@ services:
|
||||
- ./frontend/.env
|
||||
build:
|
||||
context: frontend
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: web
|
||||
restart: always
|
||||
ports:
|
||||
|
Loading…
Reference in New Issue
Block a user