Add amqp-email-forwarder daemon module
Owned daemon that consumes from the mesh amqp provision (lavinmq) and forwards to SMTP. No ports, no route. AMQP host/port/user/password templated from the amqp grant (analog: amqp-ping); vhost/exchange/queue are the app's own config; SMTP user+password are given own-secrets (secret accept). See report for the EMAILDELIVERY_T vhost integration flag.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"module": "amqp-email-forwarder",
|
||||
"version": "1",
|
||||
"capabilities": [
|
||||
"container-runtime"
|
||||
],
|
||||
"requires": [
|
||||
"amqp"
|
||||
],
|
||||
"contributes": {},
|
||||
"binds": {
|
||||
"amqp": "/var/lib/amqp-email-forwarder/amqp.json"
|
||||
},
|
||||
"secrets": {
|
||||
"amqp": "/var/lib/amqp-email-forwarder/amqp.secret"
|
||||
},
|
||||
"own-secrets": {
|
||||
"smtp-user": "/var/lib/amqp-email-forwarder/smtp-user.secret",
|
||||
"smtp-password": "/var/lib/amqp-email-forwarder/smtp-password.secret"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"id": "state",
|
||||
"type": "directory",
|
||||
"path": "/var/lib/amqp-email-forwarder",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "app-env",
|
||||
"type": "file",
|
||||
"path": "/var/lib/amqp-email-forwarder/app.env",
|
||||
"mode": "0600",
|
||||
"content": "AMQP_HOST=${bound:amqp:at}\nAMQP_PORT=${bound:amqp:port}\nAMQP_USER=${bound:amqp:as}\nAMQP_PASSWORD=${secret:amqp}\nAMQP_VHOST=EMAILDELIVERY_T\nAMQP_EXCHANGE=News.TransactionalEmailing.Command\nAMQP_QUEUE=email-forwarder\nAMQP_URL=amqp://${bound:amqp:as}:${secret:amqp}@${bound:amqp:at}:${bound:amqp:port}/EMAILDELIVERY_T\nSMTP_HOST=mail.novox.be\nSMTP_PORT=587\nSMTP_USER=${secret:smtp-user}\nSMTP_PASSWORD=${secret:smtp-password}\n"
|
||||
},
|
||||
{
|
||||
"id": "net",
|
||||
"type": "network",
|
||||
"name": "amqp-email-forwarder"
|
||||
},
|
||||
{
|
||||
"id": "app",
|
||||
"type": "container",
|
||||
"name": "amqp-email-forwarder",
|
||||
"image": "registry-api.novox.be/novox/amqp-email-forwarder:latest",
|
||||
"network": "amqp-email-forwarder",
|
||||
"env-file": [
|
||||
"/var/lib/amqp-email-forwarder/app.env"
|
||||
],
|
||||
"restart-on": [
|
||||
"app-env"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user