add rosetta RCLONE_DB_0_URL

pull/4066/head
lutty 3 years ago
parent d4d9ae9593
commit 3c59325234
  1. 6
      rosetta/infra/Dockerfile
  2. 8
      rosetta/infra/rclone.conf
  3. 4
      rosetta/infra/run.sh

@ -24,7 +24,8 @@ RUN go mod tidy
RUN make linux_static && \ RUN make linux_static && \
cp ./bin/harmony /root/harmony && \ cp ./bin/harmony /root/harmony && \
cp ./rosetta/infra/run.sh /root/run.sh cp ./rosetta/infra/run.sh /root/run.sh && \
cp ./rosetta/infra/rclone.conf /root/rclone.conf
RUN cp ./rosetta/infra/harmony-pstn.conf /root/harmony-pstn.conf && \ RUN cp ./rosetta/infra/harmony-pstn.conf /root/harmony-pstn.conf && \
cp ./rosetta/infra/harmony-mainnet.conf /root/harmony-mainnet.conf && \ cp ./rosetta/infra/harmony-mainnet.conf /root/harmony-mainnet.conf && \
@ -34,13 +35,14 @@ RUN cp ./rosetta/infra/harmony-pstn.conf /root/harmony-pstn.conf && \
FROM ubuntu:latest FROM ubuntu:latest
RUN apt update -y && \ RUN apt update -y && \
apt install libgmp-dev libssl-dev -y && \ apt install libgmp-dev libssl-dev rclone -y && \
apt -y clean all apt -y clean all
WORKDIR /root WORKDIR /root
COPY --from=build /root/harmony /root/harmony COPY --from=build /root/harmony /root/harmony
COPY --from=build /root/run.sh /root/run.sh COPY --from=build /root/run.sh /root/run.sh
COPY --from=build /root/rclone.conf /root/.config/rclone/rclone.conf
COPY --from=build /root/harmony-pstn.conf /root/harmony-pstn.conf COPY --from=build /root/harmony-pstn.conf /root/harmony-pstn.conf
COPY --from=build /root/harmony-mainnet.conf /root/harmony-mainnet.conf COPY --from=build /root/harmony-mainnet.conf /root/harmony-mainnet.conf
COPY --from=build /root/rosetta_local_fix.csv /root/rosetta_local_fix.csv COPY --from=build /root/rosetta_local_fix.csv /root/rosetta_local_fix.csv

@ -0,0 +1,8 @@
[release]
type = s3
provider = AWS
env_auth = false
region = us-west-1
acl = public-read
server_side_encryption = AES256
storage_class = REDUCED_REDUNDANCY

@ -6,6 +6,10 @@ DATA="$DIR/data"
LOGS="$DATA/logs" LOGS="$DATA/logs"
BASE_ARGS=(--http.ip "0.0.0.0" --ws.ip "0.0.0.0" --http.rosetta --node_type "explorer" --datadir "$DATA" --log.dir "$LOGS") BASE_ARGS=(--http.ip "0.0.0.0" --ws.ip "0.0.0.0" --http.rosetta --node_type "explorer" --datadir "$DATA" --log.dir "$LOGS")
if [ -n "$RCLONE_DB_0_URL" ]; then
rclone -P -L sync $RCLONE_DB_0_URL $DATA/harmony_db_0 --multi-thread-streams 4 --transfers=8
fi
mkdir -p "$LOGS" mkdir -p "$LOGS"
echo -e NODE ARGS: \" "$@" "${BASE_ARGS[@]}" \" echo -e NODE ARGS: \" "$@" "${BASE_ARGS[@]}" \"
echo "NODE VERSION: $(./harmony --version)" echo "NODE VERSION: $(./harmony --version)"

Loading…
Cancel
Save