version: '2.3' services: nats1: image: nats ports: - "${NATS_EXTERNAL_PORT:-4444}:${NATS_INTERNAL_PORT:-4444}" command: "-p 4444 --user click --pass house --tls --tlscert=/etc/certs/server-cert.pem --tlskey=/etc/certs/server-key.pem" volumes: - type: bind source: "${NATS_CERT_DIR:-}/nats" target: /etc/certs