Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/services/nats-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,15 @@ async function _renderAndPersistNatsConfig (fog, natsInstance, certName, mqttCer
const leafAdvertiseHose = fog.host || fog.ipAddress || fog.ipAddressExternal
const jsMaxMemory = _normalizeJetstreamSize(natsInstance.jsMemoryStoreSize, DEFAULT_JS_MEMORY_STORE_SIZE)
const jsMaxFile = _normalizeJetstreamSize(natsInstance.jsStorageSize, DEFAULT_JS_STORAGE_SIZE)
const serverName = (fog && fog.name) || (fog && fog.uuid) || 'nats'
const variables = {
OPERATOR_JWT: operator ? operator.jwt : undefined,
SYSTEM_ACCOUNT: systemAccount.publicKey,
NATS_CLUSTER_ROUTES: JSON.stringify(clusterRoutes),
NATS_LEAF_REMOTES: JSON.stringify(leafRemotes),
CONTROLLER_NAME: (process.env.CONTROLLER_NAME || config.get('app.name')),
JETSTREAM_DOMAIN: jetstreamDomain,
SERVER_NAME: _escapeConfString(serverName),
JETSTREAM_DOMAIN: _escapeConfString(jetstreamDomain),
JETSTREAM_KEY: _escapeConfString(jetstreamKey.jsk),
JETSTREAM_PREV_KEY: _escapeConfString(jetstreamKey.prevKey || ''),
NATS_SERVER_PORT: natsInstance.serverPort,
Expand Down
4 changes: 2 additions & 2 deletions src/templates/nats/leaf.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
port: $NATS_SERVER_PORT
server_name: $SELFNAME
server_name: "$SERVER_NAME"
pid_file: /home/runner/run/nats.pid
http_port: $NATS_HTTP_PORT

Expand All @@ -11,7 +11,7 @@ system_account = $SYSTEM_ACCOUNT

jetstream: {
store_dir: /home/runner/data
domain: $JETSTREAM_DOMAIN
domain: "$JETSTREAM_DOMAIN"
max_memory_store: $NATS_JS_MAX_MEMORY_STORE
max_file_store: $NATS_JS_MAX_FILE_STORE
cipher: chachapoly
Expand Down
4 changes: 2 additions & 2 deletions src/templates/nats/server-no-cluster.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
port: $NATS_SERVER_PORT
server_name: $SELFNAME
server_name: "$SERVER_NAME"
pid_file: /home/runner/run/nats.pid
http_port: $NATS_HTTP_PORT

Expand All @@ -11,7 +11,7 @@ system_account = $SYSTEM_ACCOUNT

jetstream: {
store_dir: /home/runner/data
domain: $JETSTREAM_DOMAIN
domain: "$JETSTREAM_DOMAIN"
max_memory_store: $NATS_JS_MAX_MEMORY_STORE
max_file_store: $NATS_JS_MAX_FILE_STORE
cipher: chachapoly
Expand Down
4 changes: 2 additions & 2 deletions src/templates/nats/server.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
port: $NATS_SERVER_PORT
server_name: $SELFNAME
server_name: "$SERVER_NAME"
pid_file: /home/runner/run/nats.pid
http_port: $NATS_HTTP_PORT

Expand All @@ -11,7 +11,7 @@ system_account = $SYSTEM_ACCOUNT

jetstream: {
store_dir: /home/runner/data
domain: $JETSTREAM_DOMAIN
domain: "$JETSTREAM_DOMAIN"
max_memory_store: $NATS_JS_MAX_MEMORY_STORE
max_file_store: $NATS_JS_MAX_FILE_STORE
cipher: chachapoly
Expand Down
Loading