Skip to content

Commit

Permalink
fix: on/off 5s
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert committed Oct 10, 2024
1 parent e517ed6 commit 300036f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions flagd/Dockerfile
Original file line number Diff line number Diff line change
@@ -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", \
Expand Down
4 changes: 2 additions & 2 deletions flagd/Dockerfile.unstable
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions scripts/restart-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 300036f

Please sign in to comment.