Created
July 31, 2020 16:28
-
-
Save lucj/887ca57e24a3a486258fac56d90e9926 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gateway { | |
name: "EXTERNAL" | |
listen: "0.0.0.0:7222" | |
authorization { | |
user: gwu | |
password: gwp | |
} | |
gateways: [ | |
{name: "INTERNAL", url: "nats://gwu:gwp@internal1:7222"}, | |
{name: "INTERNAL", url: "nats://gwu:gwp@internal2:7222"} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gateway { | |
name: "INTERNAL" | |
listen: "0.0.0.0:7222" | |
authorization { | |
user: gwu | |
password: gwp | |
} | |
gateways: [ | |
{name: "EXTERNAL", url: "nats://gwu:gwp@external1:7222"} | |
{name: "EXTERNAL", url: "nats://gwu:gwp@external2:7222"} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
external1: &external | |
image: nats | |
command: >- | |
--tlscert /etc/nats/tls/mq.pem | |
--tlskey /etc/nats/tls/mq.key | |
--tlscacert /etc/nats/tls/ca.pem | |
--client_advertise mq1.example.net:4222 | |
--cluster nats://0.0.0.0:6222 | |
--routes nats://external1:6222,nats://external2:6222 | |
--config /etc/nats/external.conf | |
networks: | |
- external | |
- shared | |
volumes: | |
- "./tls:/etc/nats/tls" | |
- "./conf/external.conf:/etc/nats/external.conf" | |
ports: | |
- 4222:4222 | |
external2: | |
<<: *external | |
command: >- | |
--tlscert /etc/nats/tls/mq.pem | |
--tlskey /etc/nats/tls/mq.key | |
--tlscacert /etc/nats/tls/ca.pem | |
--client_advertise mq2.example.net:4223 | |
--cluster nats://0.0.0.0:6222 | |
--routes nats://external1:6222,nats://external2:6222 | |
--config /etc/nats/external.conf | |
ports: | |
- 4223:4222 | |
internal1: &internal | |
image: nats | |
command: >- | |
--cluster nats://0.0.0.0:6222 | |
--routes nats://internal1:6222,nats://internal2:6222 | |
--config /etc/nats/internal.conf | |
networks: | |
- shared | |
volumes: | |
- "./conf/internal.conf:/etc/nats/internal.conf" | |
ports: | |
- 4322:4222 | |
internal2: | |
<<: *internal | |
ports: | |
- 4323:4222 | |
networks: | |
shared: {} | |
external: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment