gRPC and worker

This commit is contained in:
2026-02-03 13:40:28 -03:00
parent 67573713bd
commit a5057ba412
9 changed files with 782 additions and 34 deletions

View File

@@ -3,6 +3,8 @@ x-common-env: &common-env
REDIS_URL: redis://redis:6379/0
DJANGO_SETTINGS_MODULE: mpr.settings
DEBUG: 1
GRPC_HOST: grpc
GRPC_PORT: 50051
x-healthcheck-defaults: &healthcheck-defaults
interval: 5s
@@ -93,6 +95,26 @@ services:
redis:
condition: service_healthy
grpc:
build:
context: ..
dockerfile: ctrl/Dockerfile
command: python -m grpc.server
ports:
- "50051:50051"
environment:
<<: *common-env
GRPC_PORT: 50051
GRPC_MAX_WORKERS: 10
volumes:
- ..:/app
- ../media:/app/media
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
celery:
build:
context: ..
@@ -109,6 +131,8 @@ services:
condition: service_healthy
redis:
condition: service_healthy
grpc:
condition: service_started
timeline:
build: