Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: on/off 5s #142

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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