secure broker

This commit is contained in:
Sylvain Briat 2023-12-18 15:57:10 +01:00
parent 41ed0fcec7
commit d7b1578611
2 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ SERVICE_PORT=5003
HEALTH_SERVICE_PORT=6003 HEALTH_SERVICE_PORT=6003
# MESSAGE BROKER # MESSAGE BROKER
MESSAGE_BROKER_URI=amqp://v3-broker:5672 MESSAGE_BROKER_URI=amqp://mobicoop:mobicoop@v3-broker:5672
MESSAGE_BROKER_EXCHANGE=mobicoop MESSAGE_BROKER_EXCHANGE=mobicoop
MESSAGE_BROKER_EXCHANGE_DURABILITY=true MESSAGE_BROKER_EXCHANGE_DURABILITY=true

View File

@ -1,7 +1,8 @@
import { registerAs } from '@nestjs/config'; import { registerAs } from '@nestjs/config';
export default registerAs('broker', () => ({ export default registerAs('broker', () => ({
uri: process.env.MESSAGE_BROKER_URI ?? 'amqp://v3-broker:5672', uri:
process.env.MESSAGE_BROKER_URI ?? 'amqp://mobicoop:mobicoop@v3-broker:5672',
exchange: process.env.MESSAGE_BROKER_EXCHANGE ?? 'mobicoop', exchange: process.env.MESSAGE_BROKER_EXCHANGE ?? 'mobicoop',
durability: process.env.MESSAGE_BROKER_EXCHANGE_DURABILITY durability: process.env.MESSAGE_BROKER_EXCHANGE_DURABILITY
? process.env.MESSAGE_BROKER_EXCHANGE_DURABILITY === 'false' ? process.env.MESSAGE_BROKER_EXCHANGE_DURABILITY === 'false'