Skip to content

Commit

Permalink
fix: Add docker docker build and curl check
Browse files Browse the repository at this point in the history
  • Loading branch information
epociask committed Dec 11, 2024
1 parent 9e1b746 commit 309ab37
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ "main" ]

jobs:
build:
binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -18,4 +18,30 @@ jobs:
go-version: 1.22

- name: Build App
run: make eigenda-proxy
run: make eigenda-proxy

docker:
runs-on: ubuntu-latest
steps:
- name: Build container
uses: docker/build-push-action@v4
with:
context: .
push: false
tag: eigenda-proxy

- name: Run container as background process
shell: bash
run: |
docker run -d \
-p 4242:6666 \
-e EIGENDA_PROXY_ADDR=0.0.0.0 \
-e EIGENDA_PROXY_PORT=6666 \
-e EIGENDA_PROXY_MEMSTORE_ENABLED=true \
-e EIGENDA_PROXY_EIGENDA_CERT_VERIFICATION_DISABLED=true \
eigenda-proxy
- name: Wait for rpc to come up
shell: bash
run: |
${{ github.workspace }}/scripts/wait-for.sh
13 changes: 13 additions & 0 deletions scripts/wait-for.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# poll the proxy endpoint until we get a 0 return code or 5mins have passed, in that case exit 1
timeout_time=$(($(date +%s) + 300))

while (( $(date +%s) <= timeout_time )); do
if curl -X GET 'http://localhost:6969/health'; then
exit 0
else
sleep 20
fi
done

exit 1

0 comments on commit 309ab37

Please sign in to comment.