From dfc97d59e5ac1176b40d919a0e8350c59a4e9adf Mon Sep 17 00:00:00 2001 From: Gilles Filippini <pini@pini.fr> Date: Sun, 18 Apr 2021 11:50:52 +0200 Subject: [PATCH] [doc] use: update doc for docker image --- doc/use/docker.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/doc/use/docker.md b/doc/use/docker.md index 1b660f5f2..49df4a6df 100644 --- a/doc/use/docker.md +++ b/doc/use/docker.md @@ -4,7 +4,7 @@ Build this image: - docker build . -t duniter/duniter + docker build . -t duniter/duniter -f release/docker/Dockerfile ## Usage @@ -59,6 +59,41 @@ When no parameters are given, `duniter` is called with the command `direct_webst Note that you should not call duniter with daemon command (`webstart` or `start`) if you run docker with `-d` parameter, because the docker image will then immediately stop. +## Environment variables + +To ease the deployment automation, three environment variables are available: + +* DUNITER_MANUAL_CONFIG (boolean, default = false) + + When set to 'true' (or 'yes', or '1'), the entrypoint script waits until the file + '/etc/duniter/conf.json.orig' is present before starting the duniter + service. Here is the workflow when enabled: + 1. wait for '/etc/duniter/conf.json.orig' + 2. if this file was changed since the previous startup: + 1. Save 'conf.json' to 'conf.json.old' + 2. Replace 'conf.json' with 'conf.json.orig' + 3. Save the new file's checksum to compare with at next startup + 3. continue the startup sequence + + When set to false, the startup sequence continues. + +* DUNITER_AUTO_SYNC (boolean, default = false) + Requires 'DUNITER_SYNC_HOST'. + + When set to 'true' (or 'yes', or '1') and the folder + '/var/lib/duniter/duniter_default/data' doesn't exist, a 'duniter sync' + command will be issued before starting the service. + + When set to false, the service is started directly. + +* DUNITER_SYNC_HOST (hostname, default = "") + + This is the 'host:port' parameter to use with 'duniter sync' when + 'DUNITER_AUTO_SYNC' is enabled. + + The synchronization won't be launched when the variable is not defined + or empty. + ## Test develop version To test develop version on G1-test network: -- GitLab