This commit is contained in:
@@ -21,7 +21,17 @@ config :logger, level: logger_level
|
|||||||
|
|
||||||
config :logger, :console, format: {Logger.Formatter, :format}
|
config :logger, :console, format: {Logger.Formatter, :format}
|
||||||
|
|
||||||
if amqp_url = System.get_env("AMQP_URL") do
|
rabbitmq_host = System.get_env("RABBITMQ_HOST", "localhost")
|
||||||
|
rabbitmq_vhost = System.get_env("RABBITMQ_VHOST", "/")
|
||||||
|
rabbitmq_username = System.get_env("RABBITMQ_USERNAME")
|
||||||
|
rabbitmq_password = System.get_env("RABBITMQ_PASSWORD")
|
||||||
|
|
||||||
|
amqp_url =
|
||||||
|
if rabbitmq_username && rabbitmq_password do
|
||||||
|
"amqp://#{rabbitmq_username}:#{rabbitmq_password}@#{rabbitmq_host}/#{rabbitmq_vhost}"
|
||||||
|
end
|
||||||
|
|
||||||
|
if amqp_url do
|
||||||
config :policy_service, :amqp_url, amqp_url
|
config :policy_service, :amqp_url, amqp_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -30,11 +30,20 @@ controllers:
|
|||||||
PORT: "8080"
|
PORT: "8080"
|
||||||
PHX_HOST: "0.0.0.0"
|
PHX_HOST: "0.0.0.0"
|
||||||
PHX_SERVER: "true"
|
PHX_SERVER: "true"
|
||||||
AMQP_URL:
|
RABBITMQ_HOST:
|
||||||
|
value: "rabbitmq.rabbitmq.svc.cluster.local"
|
||||||
|
RABBITMQ_VHOST:
|
||||||
|
value: "application"
|
||||||
|
RABBITMQ_USERNAME:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-rabbitmq-user'
|
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-rabbitmq-user'
|
||||||
key: connection_string
|
key: username
|
||||||
|
RABBITMQ_PASSWORD:
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-rabbitmq-user'
|
||||||
|
key: password
|
||||||
RELEASE_COOKIE:
|
RELEASE_COOKIE:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@@ -86,7 +95,6 @@ service:
|
|||||||
port: 8080
|
port: 8080
|
||||||
protocol: HTTP
|
protocol: HTTP
|
||||||
|
|
||||||
|
|
||||||
route:
|
route:
|
||||||
main:
|
main:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
|
|||||||
Reference in New Issue
Block a user