Comments (7)
Give ejabberd time to start before register administrator(s).
case "$@" in
start)
[...]
exec ${EJABBERDCTL} "live" &
child=$!
sleep 3
${EJABBERDCTL} register admin example.de password1234
wait $child
from docker-ejabberd.
That seems to have worked, thanks!
from docker-ejabberd.
I was a bit too quick there. This solution works when running the docker with:
docker run -i -t rroemhild/docker-ejabberd
The problem is, when I try to do 'docker start CONTAINER_ID' afterwards, it crashes right away.
Do you know what's going on?
from docker-ejabberd.
In the second line from the run script set -e
immediately exit the script on errors. ejabberdctl register
returns an error on docker start
because the admin user is already registered. To test this you can comment in line 2 and re-build the image. I would prefer a function that test if the container is provisioned and then skip register the admin user(s).
from docker-ejabberd.
Yeah commenting out 'set -e' fixed my problem. Maybe create a feature request for adding provisioning of a 'superuser' during build/deploy time?
from docker-ejabberd.
My idea for this is to split the run script into multiple pre- and post- run scripts. With this solution you can extend this image with a script that i.e. register admin users or as in #24 setup a cluster.
I pushed a preview to the split-run-script
branch and add a sample script 20_ejabberd_register_admin.sh
to scripts/post
. To enable pre/post scripts they need an x
flag. Run chmod +x 20_ejabberd_register_admin.sh
and build the image.
from docker-ejabberd.
That looks very nice, I'll give it a go asap!
from docker-ejabberd.
Related Issues (20)
- Custom Module HOT 1
- Can't access admin :5280/admin HOT 2
- Cannot access API with browser show not found HOT 1
- Ejabberd shared roaster group with members @all@ HOT 5
- Kubernetes working example HOT 8
- SSL more env vars
- 18.09 tag HOT 1
- Not listening to any connection HOT 3
- Open relay HOT 5
- Keeping a CHANGELOG would be nice! HOT 2
- Getting issue with file upload HOT 1
- PostgreSQL support for auth script
- Can't connect to web admin
- setting ERLANG_NODE crashes docker container HOT 1
- dotenv and python
- Support for http auth method HOT 1
- How to do a Select on Erlang, Mnesia
- conf/ejabberd.yml.tpl seems to be outdated
- Provide tags for newer ejabberd versions HOT 1
- Easy, one-click deployment of ejabberd using Cloudron HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-ejabberd.