From 2f073375889cdd93a6ee50800fd46fb0ac1eccc7 Mon Sep 17 00:00:00 2001 From: Josh Krawczyk Date: Fri, 27 Nov 2020 21:08:20 -0500 Subject: [PATCH] fix mesh container and wait for nginx --- docker/containers/tactical-meshcentral/entrypoint.sh | 6 ++++++ docker/docker-compose.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/docker/containers/tactical-meshcentral/entrypoint.sh b/docker/containers/tactical-meshcentral/entrypoint.sh index 4e15a3e7..aa1182ed 100644 --- a/docker/containers/tactical-meshcentral/entrypoint.sh +++ b/docker/containers/tactical-meshcentral/entrypoint.sh @@ -62,5 +62,11 @@ if [ ! -f "${TACTICAL_DIR}/tmp/mesh_token" ]; then node node_modules/meshcentral --logintokenkey > ${TACTICAL_DIR}/tmp/mesh_token fi +# wait for nginx container +until (echo > /dev/tcp/"${NGINX_HOST_IP}"/443) &> /dev/null; do + echo "waiting for nginx to start..." + sleep 5 +done + # start mesh node node_modules/meshcentral diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index cec84e20..85ee32a3 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -51,6 +51,7 @@ services: POSTGRES_PASS: ${POSTGRES_PASS} APP_HOST: ${APP_HOST} API_HOST: ${API_HOST} + MESH_USER: ${MESH_USER} MESH_HOST: ${MESH_HOST} TRMM_USER: ${TRMM_USER} TRMM_PASS: ${TRMM_PASS}