docker-entrypoint.sh 434 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. echo "Initial nslookup ${HOSTNAME}.${APPNET}"
  3. nslookup ${HOSTNAME}.${APPNET}
  4. while [ $? -ne 0 ]; do
  5. echo "Waiting for ${HOSTNAME}.${APPNET} to become available"
  6. sleep 1
  7. nslookup ${HOSTNAME}.${APPNET}
  8. done
  9. sed -i "s/\${DB_CLUSTER}/\"${DB_CLUSTER}\"/" /etc/web-laboratory-admin/application.conf
  10. sed -i "s/ADMINHOST/$(dig ${HOSTNAME}.${APPNET} +short)/" /etc/web-laboratory-admin/application.conf
  11. exec "$@"