Skip to content

Commit 470761b

Browse files
committed
chore(deploy): use NATS_URL env for nats_streams
1 parent 10b0814 commit 470761b

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

deploy/dev/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ services:
101101
- ./nats:/mnt
102102
entrypoint: [""]
103103
command: ["bash", "/mnt/add_streams.sh"]
104+
environment:
105+
NATS_URL: nats://nats:4222
104106

105107
volumes:
106108
backend-data:

deploy/dev/nats/add_streams.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

33
for stream_config_file in `ls -lx /mnt/streams`; do
4-
nats -s nats://nats:4222 stream add --config /mnt/streams/$stream_config_file
4+
nats stream add --config /mnt/streams/$stream_config_file
55
done

deploy/prod/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ services:
156156
networks:
157157
- nats
158158
environment:
159+
NATS_URL: nats://nats:4222
159160
NATS_TOKEN: ${NATS_TOKEN}
160161
entrypoint: [""]
161162
command: ["bash", "/mnt/add_streams.sh"]

deploy/prod/nats/add_streams.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
nats -s nats://nats:4222 stream add --config /mnt/streams/user.json
3+
nats stream add --config /mnt/streams/user.json

0 commit comments

Comments
 (0)