zammad-docker-compose/containers/zammad-websocket/docker-entrypoint.sh

15 lines
430 B
Bash
Raw Normal View History

#!/bin/bash
if [ "$1" = 'zammad-websocket' ]; then
2017-03-08 18:37:05 +00:00
# wait for zammad process coming up
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
echo "websocket server waiting for zammads railsserver to be ready..."
2017-03-08 18:37:05 +00:00
sleep 5
done
echo "websocket server can access raillsserver now..."
2017-03-08 18:37:05 +00:00
cd ${ZAMMAD_DIR}
exec gosu ${ZAMMAD_USER}:${ZAMMAD_USER} bundle exec script/websocket-server.rb -b 0.0.0.0 start
fi