Docker image: add entrypoint script
Status | Pipeline | Created by | Stages | Actions |
---|---|---|---|---|
Warning 00:43:04
| Stage: tests Stage: package Stage: quality Stage: integration |
Download artifacts
No artifacts found | ||
First of all, this script moves the duniter configuration file 'conf.json' into the '/etc/duniter' volume, so that one could delete the '/var/lib/duniter' volume without losing the configuration.
A symbolic link is set up into /var/lib/duniter/duniter_default to point to the new path: /var/lib/duniter/duniter_default/conf.json -> /etc/duniter/conf.json
Then, this script enables the folowing environment variables:
DUNITER_MANUAL_CONFIG (boolean, default = false)
When set to 'true' (or 'yes', or '1'), the script waits until the file '/etc/duniter/conf.json.orig' is present before starting the duniter service. Here is the workflow when enabled:
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 wariable is not defined or empty.
Status | Pipeline | Created by | Stages | Actions |
---|---|---|---|---|
Warning 00:43:04
| Stage: tests Stage: package Stage: quality Stage: integration |
Download artifacts
No artifacts found | ||
0 |