diff --git a/Dockerfile b/Dockerfile index b02bcf8..eedf632 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ +FROM synadia/nats-server:2.2.0-JS-preview AS JS + FROM synadia/nats-box:latest +COPY --from=JS /nats-server /nats-server + # goreleaser does the build COPY jsm /usr/local/bin/ diff --git a/jsm/main.go b/jsm/main.go index 4c7e5aa..55288d1 100644 --- a/jsm/main.go +++ b/jsm/main.go @@ -37,7 +37,7 @@ func main() { jsm.HelpFlag.Short('h') - jsm.Flag("server", "NATS servers").Short('s').Default("localhost:4222").StringVar(&servers) + jsm.Flag("server", "NATS servers").Short('s').Default("localhost:4222").Envar("SERVERS").StringVar(&servers) jsm.Flag("creds", "User credentials").StringVar(&creds) jsm.Flag("tlscert", "TLS public certificate").ExistingFileVar(&tlsCert) jsm.Flag("tlskey", "TLS private key").ExistingFileVar(&tlsCert) diff --git a/jsm/obs_command.go b/jsm/obs_command.go index 618901d..7bfb3ea 100644 --- a/jsm/obs_command.go +++ b/jsm/obs_command.go @@ -247,6 +247,8 @@ func (c *obsCmd) createAction(pc *kingpin.ParseContext) (err error) { c.cfg.AckPolicy = api.AckExplicit } + c.cfg.AckWait = c.ackWait + if c.cfg.Delivery != "" { if c.replyPolicy == "" { mode := ""