From c36c7144cb27b86e7b45747fd5698670182801cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20B=C3=B8gh=20Fangel?=
Date: Thu, 13 Jun 2019 15:46:17 +0200
Subject: [PATCH] updates documentation with info about new env var and
dedicated user gotenberg
---
build/docs/content/01-install.md | 9 ++++++++
.../docs/content/03-environment-variables.md | 15 ++++++++----
docs/index.html | 23 +++++++++++++++++--
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/build/docs/content/01-install.md b/build/docs/content/01-install.md
index 03585a66..0437115c 100644
--- a/build/docs/content/01-install.md
+++ b/build/docs/content/01-install.md
@@ -10,6 +10,8 @@ You may start it with:
$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:5
```
+All processes in the docker container runs as a dedicated non-root user called `gotenberg` with user id `1001` from the working dir `/gotenberg`.
+
> The API will be available at [http://localhost:3000](http://localhost:3000).
## Docker Compose
@@ -38,5 +40,12 @@ Otherwise the API will not be able to launch Google Chrome and LibreOffice (unoc
> The more resources are granted, the quicker will be the conversions.
+Also, in the deployment spec of the pod, specify the uid `1001` of the user `gotenberg`:
+```
+ securityContext:
+ privileged: false
+ runAsUser: 1001
+```
+
In the following examples, we will assume your
Gotenberg API is available at [http://localhost:3000](http://localhost:3000).
\ No newline at end of file
diff --git a/build/docs/content/03-environment-variables.md b/build/docs/content/03-environment-variables.md
index 3f081d56..685cf91c 100644
--- a/build/docs/content/03-environment-variables.md
+++ b/build/docs/content/03-environment-variables.md
@@ -8,7 +8,7 @@ You may customize the API behaviour thanks to environment variables.
In order to save some resources, the Gotenberg image accepts the environment variable `DISABLE_GOOGLE_CHROME`.
-It takes the strings `"0"` or `"1"` as value.
+It takes the strings `"0"` or `"1"` as value where `1` means `true`
> If Google Chrome is disabled, the following conversions will **not** be available anymore:
> [HTML](#html), [URL](#url) and [Markdown](#markdown)
@@ -37,12 +37,19 @@ By default, the API will add a log entry when the [healthcheck endpoint](#ping)
You may turn off this logging so as to avoid unnecessary entries in your logs with the environment variable `DISABLE_HEALTHCHECK_LOGGING`.
-This environment variable operates in the same manner as the `DISABLE_GOOGLE_CHROME` and `DISABLE_UNOCONV` variables operate in that it accepts the strings `"0"` or `"1"` as values.
-
+This environment variable operates in the same manner as the `DISABLE_GOOGLE_CHROME` and `DISABLE_UNOCONV` variables operate in that it accepts the strings `"0"` or `"1"` as values, where `1` is enabled.
## Default listen port
By default, the API will listen on port `3000`. For most use cases this is perfectly fine, but at times there may be cases where you need to change this due to port conflicts.
You may customize this port location with the environment variable `DEFAULT_LISTEN_PORT`.
-This environment variable accepts any string that can be turned into a port number (e.g., the string `"0"` up to the string `"65535"`).
\ No newline at end of file
+This environment variable accepts any string that can be turned into a port number (e.g., the string `"0"` up to the string `"65535"`).
+
+## Debug logging of process startup
+
+By default, stdout and stderr messages from the started processes are disabled.
+
+You may enable some debug logging from starting the process by setting the environment variable `DEBUG_PROCESS_STARTUP`.
+
+This environment variable operates in the same manner as the `DISABLE_GOOGLE_CHROME` and `DISABLE_UNOCONV` variables operate in that it accepts the strings `"0"` or `"1"` as values, where `1` means `true`.
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index bcf2fd81..fa8df116 100755
--- a/docs/index.html
+++ b/docs/index.html
@@ -139,6 +139,8 @@
$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:5
+
All processes in the docker container runs as a dedicated non-root user called gotenberg with user id 1001 from the working dir /gotenberg.
You may turn off this logging so as to avoid unnecessary entries in your logs with the environment variable DISABLE_HEALTHCHECK_LOGGING.
-
This environment variable operates in the same manner as the DISABLE_GOOGLE_CHROME and DISABLE_UNOCONV variables operate in that it accepts the strings "0" or "1" as values.
+
This environment variable operates in the same manner as the DISABLE_GOOGLE_CHROME and DISABLE_UNOCONV variables operate in that it accepts the strings "0" or "1" as values, where 1 is enabled.
By default, stdout and stderr messages from the started processes are disabled.
+
+
You may enable some debug logging from starting the process by setting the environment variable DEBUG_PROCESS_STARTUP.
+
+
This environment variable operates in the same manner as the DISABLE_GOOGLE_CHROME and DISABLE_UNOCONV variables operate in that it accepts the strings "0" or "1" as values, where 1 means true.