docker (demo): fix starting + better UX:
- Use the new `wait_for_service` option to be sure that Prosody is launched. - Use the new `init_script_path` option to initiate forums and bookmark a demo room. - Activate MUC service. - Change log formats to make them more readable.
This commit is contained in:
parent
6fa46e20fd
commit
b12d7a48e1
6 changed files with 67 additions and 7 deletions
17
docker/backend-dev-demo/scripts/init_script.sh
Executable file
17
docker/backend-dev-demo/scripts/init_script.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
SETUP_INDICATOR="/home/libervia/.local/share/libervia/setup_complete.flag"
|
||||
FORUMS_JSON_FILE="/home/libervia/forums.json"
|
||||
|
||||
if [ ! -f "$SETUP_INDICATOR" ]; then
|
||||
echo "First run detected. Setting up the environment and configuration."
|
||||
|
||||
libervia-cli profile modify -D -cp demo --pwd demo
|
||||
libervia-cli forums set -p demo < $FORUMS_JSON_FILE
|
||||
libervia-cli bookmarks add -pdemo -a demo@chat.server1.test
|
||||
|
||||
touch "$SETUP_INDICATOR"
|
||||
echo "Initial setup complete."
|
||||
else
|
||||
echo "Not the first run. Skipping setup."
|
||||
fi
|
||||
Loading…
Reference in a new issue