Add role netmaker_server
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
per_listener_settings false
|
||||
listener 8883
|
||||
allow_anonymous false
|
||||
|
||||
listener 1883
|
||||
allow_anonymous false
|
||||
|
||||
plugin /usr/lib/mosquitto_dynamic_security.so
|
||||
plugin_opt_config_file /mosquitto/data/dynamic-security.json
|
||||
23
netmaker_server/files/opt/netmaker_server/mosquitto/config/wait.sh
Executable file
23
netmaker_server/files/opt/netmaker_server/mosquitto/config/wait.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/ash
|
||||
|
||||
wait_for_netmaker() {
|
||||
echo "SERVER: ${NETMAKER_SERVER_HOST}"
|
||||
until curl --output /dev/null --silent --fail --head \
|
||||
--location "${NETMAKER_SERVER_HOST}/api/server/health"; do
|
||||
echo "Waiting for netmaker server to startup"
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
main(){
|
||||
# wait for netmaker to startup
|
||||
apk add curl
|
||||
wait_for_netmaker
|
||||
echo "Starting MQ..."
|
||||
# Run the main container command.
|
||||
/docker-entrypoint.sh
|
||||
/usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf
|
||||
|
||||
}
|
||||
|
||||
main "${@}"
|
||||
Reference in New Issue
Block a user