Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

chore: update docker entrypoint for migrations #387

Merged
merged 1 commit into from
Nov 13, 2020
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
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ RUN sed -i 's#"./src/cli"#"./lib/cli"#g' package.json

EXPOSE 3030

ENV RIFM_PRECACHE_TARGETS all

ENTRYPOINT [ "./bin/entrypoint" ]

LABEL maintainer="adam@iovlabs.org"
Expand Down
3 changes: 1 addition & 2 deletions bin/entrypoint
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh

./bin/run db-sync "$@"
./bin/run precache "$@" $RIFM_PRECACHE_TARGETS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about precache, when it will be running then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need. start will continue where it ended. I assume that the updates are fairly quick so it will be only few blocks behind.

It was a design decision to require run precache in order to split the long running fetching of data from the start of blockchain from actually being ready to serve data to user... Technically the precache did not have to be there as start would just start fetching data from "latest block" (which would be the genesis block in that case)...

Copy link
Contributor Author

@AuHau AuHau Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will require to run precache on the first deployment with the migrations though... Devops will have to do that manually, but after that anymore...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear

./bin/run db-migration --up
./bin/run start "$@"