Last active
March 20, 2018 09:51
-
-
Save dcharbonnier/7ebb6c5d8065c02ccaba326db0cbcd3f to your computer and use it in GitHub Desktop.
NATS.io stack for docker swarm
This file contains hidden or 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.4' | |
services: | |
nats-init: | |
image: 'nats:latest' | |
entrypoint: "/gnatsd --cluster nats://0.0.0.0:6222 --no_advertise --tls --tlscert /run/secrets/nats.crt --tlskey /run/secrets/nats.key --auth ${TOKEN} -DV" | |
secrets: | |
- nats.crt | |
- nats.key | |
nats: | |
image: 'nats:latest' | |
entrypoint: "/gnatsd --cluster nats://0.0.0.0:6222 --no_advertise --tls --tlscert /run/secrets/nats.crt --tlskey /run/secrets/nats.key --routes nats://${TOKEN}@nats-init:6222 --auth ${TOKEN} -DV" | |
secrets: | |
- nats.crt | |
- nats.key | |
ports: | |
- "4222:4222" | |
deploy: | |
replicas: 6 | |
secrets: | |
nats.crt: | |
external: true | |
nats.key: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment