Closed gleenn closed 7 years ago
yes, there is: https://github.com/tolitius/mount/blob/master/doc/runtime-arguments.md#passing-runtime-arguments
Usually such credentials are best kept in config files / Zookeeper / Consul, etc.. Where if you really need command line arguments, you can pass -D
arguments from a command line which would be set as system properties, which you can use to auto merge with your config files with something like cprop.
Thanks, should have dug deeper in the docs.
Is there a way to pass i.e. command-line arguments to the start functions? All the examples show the start functions deriving configuration for things like network ports and database credentials from files on disk. This conveniently doesn't show how one would take a port specification from the command-line.
This is what I'm trying to accomplish, or to be told a different way to inject the credentials: (defstate db-connection (fn [credentials] (create-db-conn credentials))) (mount/start [#'db-connection (:credentials cli-args)])