1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-01-07 04:49:17 +00:00
ctrl/scripts/nats-server/generate-nats-conf/generate-nats-conf.sh

30 lines
580 B
Bash
Raw Normal View History

2021-10-05 11:39:03 +00:00
#!/bin/bash
2021-10-05 11:37:45 +00:00
cat >./nats.conf <<EOF
port: 4022
tls {
cert_file: "/app/le.crt"
key_file: "/app/le.key"
}
authorization: {
users = [
{
}
{
# central
nkey: FILL-IN-CENTRAL-USER-KEY-HERE
permissions: {
publish: {
allow: ["FILL-IN-ORGANISATION-HERE.>","errorCentral.>","central.>"]
}
subscribe: {
allow: ["FILL-IN-ORGANISATION-HERE.>","errorCentral.>","central.>"]
}
}
}
2021-10-05 11:37:45 +00:00
]
}
EOF