From 43412c7b065172bd243be90b9b13bcbea080924d Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 30 Oct 2023 17:35:16 +0100 Subject: [PATCH] address review Signed-off-by: Simon L --- Dockerfile | 2 +- start.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b8b6f6..e144e0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,5 @@ RUN set -ex; \ COPY --chmod=775 start.sh /start.sh EXPOSE 8080 -ENTRYPOINT /start.sh +ENTRYPOINT ["/start.sh"] CMD ["java","-jar","nextcloud-dlna.jar"] diff --git a/start.sh b/start.sh index 6d880fe..7671296 100644 --- a/start.sh +++ b/start.sh @@ -1,11 +1,12 @@ #!/bin/bash # Wait for Nextcloud to come online -if [ -n "$NC_DOMAIN" ] && [ "$NC_PORT" ]; then +if [ -n "$NC_DOMAIN" ] && [ -n "$NC_PORT" ]; then while ! nc -z "$NC_DOMAIN" "$NC_PORT"; do - echo "Waiting for Nextcloud to start..." + echo "Waiting for Nextcloud to start on $NC_DOMAIN:$NC_PORT..." sleep 5 done + echo "Nextcloud found on $NC_DOMAIN:$NC_PORT!" fi # Execute CMD