From 300036fe3643ce7080b9037c263f20e0bba0cbbc Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 10 Oct 2024 16:37:16 -0400 Subject: [PATCH] fix: on/off 5s Signed-off-by: Todd Baert --- flagd/Dockerfile | 4 ++-- flagd/Dockerfile.unstable | 4 ++-- scripts/restart-wrapper.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flagd/Dockerfile b/flagd/Dockerfile index 7cd5e5e..42aa3f8 100644 --- a/flagd/Dockerfile +++ b/flagd/Dockerfile @@ -1,12 +1,12 @@ # we NEED flagd v0.6.4 as a minimum -FROM ghcr.io/open-feature/flagd:v0.11.3 as flagd +FROM ghcr.io/open-feature/flagd:v0.11.3 AS flagd FROM busybox:1.36 COPY --from=flagd /flagd-build /flagd COPY flags/* . COPY scripts/* . -LABEL org.opencontainers.image.source = "https://github.com/open-feature/flagd-testbed" +LABEL org.opencontainers.image.source="https://github.com/open-feature/flagd-testbed" ENTRYPOINT ["sh", "change-flag-wrapper.sh", "./flagd", "start", \ "-f", "file:testing-flags.json", \ diff --git a/flagd/Dockerfile.unstable b/flagd/Dockerfile.unstable index 243cdcf..9ceb343 100644 --- a/flagd/Dockerfile.unstable +++ b/flagd/Dockerfile.unstable @@ -1,12 +1,12 @@ # we NEED flagd v0.6.4 as a minimum -FROM ghcr.io/open-feature/flagd:v0.11.3 as flagd +FROM ghcr.io/open-feature/flagd:v0.11.3 AS flagd FROM busybox:1.36 COPY --from=flagd /flagd-build /flagd COPY flags/* . COPY scripts/* . -LABEL org.opencontainers.image.source = "https://github.com/open-feature/flagd-testbed" +LABEL org.opencontainers.image.source="https://github.com/open-feature/flagd-testbed" ENTRYPOINT ["sh", "restart-wrapper.sh", "./flagd", "start", \ "-f", "file:testing-flags.json"] diff --git a/scripts/restart-wrapper.sh b/scripts/restart-wrapper.sh index 9bb8301..2b73b3e 100644 --- a/scripts/restart-wrapper.sh +++ b/scripts/restart-wrapper.sh @@ -23,9 +23,9 @@ do echo 'starting process...' "$@" & child=$! - sleep 5 - echo "killing pid $child..." && sleep 5 && kill -9 "$child" + sleep 5 && echo "killing pid $child..." && kill -9 "$child" while kill -0 "$child" 2> /dev/null; do # wait for child to exit (kill -0 is falsy if pid is gone) sleep 1 done + echo 'killed...' && sleep 5 done \ No newline at end of file