-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
128 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ARG CURIO_TEST_IMAGE=curio/curio-all-in-one:latest | ||
############################################################################# | ||
FROM ${CURIO_TEST_IMAGE} | ||
|
||
ARG BUILD_VERSION=0.1 | ||
|
||
LABEL org.opencontainers.image.version=$BUILD_VERSION \ | ||
org.opencontainers.image.authors="Curio Dev Team" \ | ||
name="indexer-dev" \ | ||
maintainer="Curio Dev Team" \ | ||
vendor="Curio Dev Team" \ | ||
version=$BUILD_VERSION \ | ||
release=$BUILD_VERSION \ | ||
summary="This image is used to host the curio dev service" \ | ||
description="This image is used to host the curio dev service" | ||
|
||
EXPOSE 12320 | ||
|
||
VOLUME /var/tmp/filecoin-proof-parameters | ||
VOLUME /var/lib/genesis | ||
VOLUME /var/lib/builtin-actors | ||
|
||
WORKDIR /app | ||
RUN mkdir -p /app | ||
|
||
COPY entrypoint.sh /app | ||
|
||
USER root | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
STORETHEINDEX_PATH=$STORETHEINDEX_PATH | ||
echo Wait for lotus is ready ... | ||
lotus wait-api | ||
head=0 | ||
# Loop until the head is greater than 9 | ||
while [[ $head -le 9 ]]; do | ||
head=$(lotus chain list | awk '{print $1}' | awk -F':' '{print $1}' | tail -1) | ||
if [[ $head -le 9 ]]; then | ||
echo "Current head: $head, which is not greater than 9. Waiting..." | ||
sleep 1 # Wait for 4 seconds before checking again | ||
else | ||
echo "The head is now greater than 9: $head" | ||
fi | ||
done | ||
|
||
myip=`nslookup piece-server | grep -v "#" | grep Address | awk '{print $2}'` | ||
|
||
echo $LOTUS_PATH | ||
|
||
# Init Indexer | ||
if [ ! -f $STORETHEINDEX_PATH/.init ]; then | ||
echo "Initialising indexer" | ||
storetheindex init --listen-admin /ip4/0.0.0.0/tcp/3002 --listen-finder /ip4/0.0.0.0/tcp/3000 --listen-ingest /ip4/0.0.0.0/tcp/3001 --cachesize 10485760 --no-bootstrap | ||
touch $STORETHEINDEX_PATH/.init | ||
fi | ||
|
||
# Start piece-server in HTTP mode (no HTTPS) | ||
echo "Starting indexer" | ||
storetheindex daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters