Skip to content

Commit 0bb2bf3

Browse files
authored
Merge pull request #2292 from Kong/docs/kong-read-only
docs(kong): add read-only mode reference
2 parents 0bc9224 + 1c7eb35 commit 0bb2bf3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

kong/content.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,29 @@ $ docker exec -it kong kong reload
146146

147147
This will run the [`kong reload`](https://docs.konghq.com/latest/cli/#reload) command in your container.
148148

149+
# Running Kong in read-only mode
150+
151+
Starting with version `3.2.0` of Kong it is possible to run the container in read-only mode. To do so, mount a Docker volume to the locations where Kong needs to write data. The default configuration requires write access to `/tmp` and to the prefix path, as provided by the following example:
152+
153+
```shell
154+
$ docker run --read-only -d --name kong \
155+
-v "$(pwd)/declarative:/kong/declarative/" \
156+
-v "$(pwd)/tmp_volume:/tmp" \
157+
-v "$(pwd)/prefix_volume:/var/run/kong" \
158+
-e "KONG_PREFIX=/var/run/kong" \
159+
-e "KONG_DATABASE=off" \
160+
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \
161+
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \
162+
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \
163+
-e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \
164+
-e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" \
165+
-p 8000:8000 \
166+
-p 8443:8443 \
167+
-p 8001:8001 \
168+
-p 8444:8444 \
169+
%%IMAGE%%
170+
```
171+
149172
# Kubernetes Ingress
150173

151174
Among the many deployment options [available](https://konghq.com/install), Kong also offers a [Kubernetes Ingress Controller](https://github.com/Kong/kubernetes-ingress-controller) ready to use in your K8s environment.

0 commit comments

Comments
 (0)