Skip to content

Commit

Permalink
fix: delay graphql api start
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Dec 16, 2022
1 parent f05e96b commit 1426986
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/api.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ COPY --from=builder /build/node_modules /app/node_modules
COPY --from=builder /build/packages/common /app/node_modules/@subql/common
COPY --from=builder /build/packages/utils /app/node_modules/@subql/utils

ENTRYPOINT ["/sbin/tini", "--", "yarn", "start:prod"]
COPY ./scripts/api-entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh
7 changes: 7 additions & 0 deletions scripts/api-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

echo "sleeping for 5s - waiting for subql node to complete DB initialization..."
sleep 5

exec /sbin/tini -- yarn start:prod

0 comments on commit 1426986

Please sign in to comment.