This commit is contained in:
parent
858c95220e
commit
caf9e1c0f3
@ -1,3 +1,5 @@
|
|||||||
|
version: '3.4'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
guard:
|
guard:
|
||||||
external: false
|
external: false
|
||||||
@ -22,16 +24,29 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- guard
|
- guard
|
||||||
volumes:
|
|
||||||
- ./artemis-volume:/var/lib/artemis-instance
|
|
||||||
|
|
||||||
guard-service:
|
guard-service:
|
||||||
image: registry.kmlabz.com/birbnetes/guard-service
|
image: registry.kmlabz.com/birbnetes/guard-service
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- activemq
|
- activemq
|
||||||
- postgres
|
- rabbitmq
|
||||||
|
environment:
|
||||||
|
SENTRY_DSN: "https://5c925c5a898b4b7d82ee51cd544de623@sentry.kmlabz.com/3"
|
||||||
|
GUARD_RABBITMQ_HOSTNAME: rabbitmq
|
||||||
|
GUARD_RABBITMQ_USERNAME: rabbitmq
|
||||||
|
GUARD_RABBITMQ_PASSWORD: rabbitmq
|
||||||
|
GUARD_RABBITMQ_EXCHANGE: "sample"
|
||||||
|
GUARD_MQTT_HOSTNAME: activemq
|
||||||
|
GUARD_MQTT_PORT: "1883"
|
||||||
|
GUARD_MQTT_USERNAME: artemis
|
||||||
|
GUARD_MQTT_PASSWORD: artemis
|
||||||
|
GUARD_MQTT_TOPIC: "command"
|
||||||
networks:
|
networks:
|
||||||
- guard
|
- guard
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8080:8080"
|
- "127.0.0.1:8080:8080"
|
||||||
|
|
||||||
|
input-service:
|
||||||
|
image: mockserver/mockserver
|
||||||
|
command: -logLevel DEBUG -serverPort 80
|
||||||
|
@ -49,6 +49,7 @@ def setup_rabbit() -> None:
|
|||||||
exclusive=True).method.queue
|
exclusive=True).method.queue
|
||||||
channel.queue_bind(exchange=config.RABBIT_EXCHANGE, queue=queue)
|
channel.queue_bind(exchange=config.RABBIT_EXCHANGE, queue=queue)
|
||||||
channel.basic_consume(queue=queue, on_message_callback=on_message, auto_ack=True)
|
channel.basic_consume(queue=queue, on_message_callback=on_message, auto_ack=True)
|
||||||
|
channel.start_consuming()
|
||||||
|
|
||||||
|
|
||||||
def on_message(channel, method_frame, header_frame, body):
|
def on_message(channel, method_frame, header_frame, body):
|
||||||
|
Loading…
Reference in New Issue
Block a user