1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00
ctrl/scripts/nats-server/generate-nats-conf/generate-nats-conf.sh
2021-12-08 12:30:08 +01:00

26 lines
555 B
Bash
Executable file

#!/bin/bash
cat >./nats.conf <<EOF
port: 4222
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.>"]
}
}
}
]
}
EOF