mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 12:41:04 +00:00
refactor: ( payment ) use rabbitmq for webhooks event
This commit is contained in:
@@ -6,6 +6,24 @@
|
||||
# Run: docker compose up -d
|
||||
|
||||
services:
|
||||
# Message broker for payment event delivery (payment-api -> passenger/freight).
|
||||
# Management UI: http://localhost:15672 (login edr / edr_secret). vhost: payment.
|
||||
# In deployed envs this is a shared/managed RabbitMQ; only PAYMENT_RABBITMQ_URL changes.
|
||||
rabbitmq:
|
||||
image: rabbitmq:3.13-management
|
||||
ports:
|
||||
- "5672:5672" # AMQP — apps connect here
|
||||
- "15672:15672" # management UI
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: edr
|
||||
RABBITMQ_DEFAULT_PASS: edr_secret
|
||||
RABBITMQ_DEFAULT_VHOST: payment
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
freight-api:
|
||||
build:
|
||||
context: .
|
||||
@@ -25,6 +43,9 @@ services:
|
||||
- "${PASSENGER_API_PORT:-4000}:${PASSENGER_API_PORT:-4000}"
|
||||
env_file:
|
||||
- apps/edr-passenger-api/.env
|
||||
depends_on:
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
|
||||
freight-portal:
|
||||
build:
|
||||
@@ -96,6 +117,9 @@ services:
|
||||
- "${PAYMENT_API_PORT:-3008}:${PAYMENT_API_PORT:-3008}"
|
||||
env_file:
|
||||
- apps/edr-payment-api/.env
|
||||
depends_on:
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
|
||||
secrets:
|
||||
npmrc:
|
||||
|
||||
Reference in New Issue
Block a user