Skip to content

Commit 8d880f3

Browse files
authored
Merge pull request #6 from samumbach/improve-readme
Improve README
2 parents 4548e7f + f637ac3 commit 8d880f3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.asciidoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ After parsing and reader macro expansion, the resulting data will be:
8080
{:connection-pool
8181
{:user-name "accountsuser"
8282
:user-pw "change-me"
83-
:url "jdbc:postgresql://db.example.org:5432/accounts"]}
83+
:url "jdbc:postgresql://db.example.org:5432/accounts"}
8484
:web-server
8585
{:port 8192}}
8686
----
@@ -120,12 +120,12 @@ properties beyond those obtained from docker secrets, environment variables and
120120
----
121121
(require '[clojure.edn :as edn]
122122
'[clojure.java.io :as io]
123-
'[com.walmartlabs.dyn-edn :refer [env-readers])
123+
'[com.walmartlabs.dyn-edn :refer [env-readers]])
124124
125125
(->> "config.edn"
126126
io/resource
127127
slurp
128-
(edn/read-string {:readers (env-readers)})
128+
(edn/read-string {:readers (env-readers)}))
129129
----
130130

131131
=== Usage with Docker secrets
@@ -147,23 +147,23 @@ $ docker service create --replicas 1 --name <servicename> \
147147

148148
The above will create a secret called `my-secret` and make it available as a file at `/mysecrets/mysecret`.
149149

150-
The following can be used to recover the secret within the Docker conainer:
150+
The following can be used to recover the secret within the Docker container:
151151

152152
[source,clojure]
153153
----
154154
(require '[clojure.edn :as edn]
155155
'[clojure.java.io :as io]
156-
'[com.walmartlabs.dyn-edn :refer [env-readers])
156+
'[com.walmartlabs.dyn-edn :refer [env-readers]])
157157
158158
(->> "config.edn"
159159
io/resource
160160
slurp
161161
(edn/read-string
162162
{:readers (env-readers
163-
{:docker-secrets-dir "/mysecrets"})})
163+
{:docker-secrets-dir "/mysecrets"})}))
164164
----
165165

166-
If the `:docker-secrets-dir` is not available as a property, it's assumed that all secrets have been mounted at
166+
If `:docker-secrets-dir` is not available as a property, it's assumed that all secrets have been mounted at
167167
`/run/secrets` (which is Docker's default location).
168168

169169
NOTE: In order for secrets to be available under this library, it is assumed that all secrets are mounted in the same directory.
@@ -180,7 +180,7 @@ $ docker service create --replicas 1 --name <servicename> \
180180
----
181181

182182
and if DB_PORT is **not** in the Environment of the container, the outcome will be the same. The value of the parameter
183-
will be read from the file at `/run/secrets/DB_HOST` and made available.
183+
will be read from the file at `/run/secrets/DB_PORT` and made available.
184184

185185
NOTE: the value of an env variable with a particular name will overwrite a secret with
186186
that name i.e. an environment variable has precedence.

0 commit comments

Comments
 (0)