Add new alert architecture
This commit is contained in:
@@ -730,6 +730,43 @@ services:
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
alert-processor:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./services/alert_processor/Dockerfile
|
||||
args:
|
||||
- ENVIRONMENT=${ENVIRONMENT}
|
||||
- BUILD_DATE=${BUILD_DATE}
|
||||
image: bakery/alert-processor:${IMAGE_TAG}
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
notification-service:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- bakery-network
|
||||
volumes:
|
||||
- log_storage:/app/logs
|
||||
- ./services/alert_processor:/app
|
||||
- ./shared:/app/shared
|
||||
deploy:
|
||||
replicas: 2
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
reservations:
|
||||
memory: 256M
|
||||
# No health check needed - this is a background worker service
|
||||
# healthcheck:
|
||||
# test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
|
||||
inventory-service:
|
||||
build:
|
||||
context: .
|
||||
@@ -760,7 +797,7 @@ services:
|
||||
- ./services/inventory:/app
|
||||
- ./shared:/app/shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health/')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -797,7 +834,7 @@ services:
|
||||
- ./services/recipes:/app
|
||||
- ./shared:/app/shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -835,7 +872,7 @@ services:
|
||||
- ./services/suppliers:/app
|
||||
- ./shared:/app/shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -911,7 +948,7 @@ services:
|
||||
- ./services/orders:/app
|
||||
- ./shared:/app/shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -950,7 +987,7 @@ services:
|
||||
- ./services/production:/app
|
||||
- ./shared:/app/shared
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user