Created
July 30, 2020 12:48
-
-
Save ripienaar/835014301a5615229cde8c7b344a2249 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
--- | |
version: '3' | |
services: | |
external.example.net: | |
image: nats | |
command: >- | |
--tlscert /etc/nats/tls/external.example.net.cert | |
--tlskey /etc/nats/tls/external.example.net_u.key | |
--tlscacert /etc/nats/tls/ca-cert.pem | |
--client_advertise external.example.net:4222 | |
--config /etc/nats/external.conf | |
networks: | |
- external | |
- shared | |
volumes: | |
- "./tls:/etc/nats/tls" | |
- "./external.conf:/etc/nats/external.conf" | |
ports: | |
- 4222:4222 | |
internal1.example.net: &internal | |
image: nats | |
command: >- | |
--cluster nats://0.0.0.0:6222 | |
--routes nats://internal1.example.net:6222,nats://internal2.example.net:6222 | |
--config /etc/nats/internal.conf | |
networks: | |
- shared | |
volumes: | |
- "./internal.conf:/etc/nats/internal.conf" | |
ports: | |
- 4223:4222 | |
internal2.example.net: | |
<<: *internal | |
ports: | |
- 4224:4222 | |
networks: | |
shared: {} | |
external: {} |
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:[email protected]:7222"}, | |
{name: "INTERNAL", url: "nats://gwu:[email protected]: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:[email protected]:7222"} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment