From 8e9f6655909f5d582f938cdd023d3329cb0b08ce Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 2 Aug 2021 12:15:12 +0200 Subject: [PATCH] Document CTL_ON_CREATE and CTL_ON_START --- ecs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ecs/README.md b/ecs/README.md index fe1f170..765e202 100644 --- a/ecs/README.md +++ b/ecs/README.md @@ -199,6 +199,23 @@ All these files are owned by ejabberd user inside the container. Corresponding you need to map this to valid `UID:GID` on your host to get read/write access on mounted directories. +## Commands on start + +The ejabberdctl script reads the `CTL_ON_CREATE` environment variable +the first time the docker container is started, +and reads `CTL_ON_START` every time the container is started. +Those variables can contain one ejabberdctl command, +or several commands separated with the blankspace and `;` characters. + +Example usage (see the full [docker-compose.yml](https://github.com/processone/docker-ejabberd/issues/64#issuecomment-887741332) example): +```yaml + environment: + - CTL_ON_CREATE=register admin localhost asd + - CTL_ON_START=stats registeredusers ; + check_password admin localhost asd ; + status +``` + # Generating ejabberd release ## Configuration