File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,15 +13,9 @@ if [[ -z "${LITESTREAM_REPLICA_URL}" ]]; then
1313 exec dstack server --host 0.0.0.0
1414else
1515 if [[ ! -f " $DB_PATH " ]]; then
16- echo " Attempting Litestream restore..."
17- if ! output=$( litestream restore -o " $DB_PATH " " $LITESTREAM_REPLICA_URL " 2>&1 ) ; then
18- if echo " $output " | grep -qiE " cannot calc restore plan" ; then
19- echo " No replica snapshots found; starting with empty database."
20- else
21- echo " $output " >&2
22- exit 1
23- fi
24- fi
16+ echo " Starting db restore"
17+ litestream restore -if-replica-exists -o " $DB_PATH " " $LITESTREAM_REPLICA_URL "
18+ echo " Finished db restore"
2519 fi
2620 exec litestream replicate -exec " dstack server --host 0.0.0.0" " $DB_PATH " " $LITESTREAM_REPLICA_URL "
2721fi
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ RUN apt-get update && apt-get install -y \
1515 && rm -rf /var/lib/apt/lists/*
1616
1717RUN if [ $(uname -m) = "aarch64" ]; then ARCH="arm64" ; else ARCH="x86_64" ; fi && \
18- curl https://github.com/benbjohnson/litestream/releases/download/v0.5.0 /litestream-0.5.0 -linux-$ARCH.deb -O -L && \
19- dpkg -i litestream-0.5.0 -linux-$ARCH.deb
18+ curl https://github.com/benbjohnson/litestream/releases/download/v0.5.9 /litestream-0.5.9 -linux-$ARCH.deb -O -L && \
19+ dpkg -i litestream-0.5.9 -linux-$ARCH.deb
2020
2121ADD https://astral.sh/uv/install.sh /uv-installer.sh
2222RUN sh /uv-installer.sh && rm /uv-installer.sh
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ RUN apt-get update && apt-get install -y \
1313 && rm -rf /var/lib/apt/lists/*
1414
1515RUN if [ $(uname -m) = "aarch64" ]; then ARCH="arm64" ; else ARCH="x86_64" ; fi && \
16- curl https://github.com/benbjohnson/litestream/releases/download/v0.5.0 /litestream-0.5.0 -linux-$ARCH.deb -O -L && \
17- dpkg -i litestream-0.5.0 -linux-$ARCH.deb
16+ curl https://github.com/benbjohnson/litestream/releases/download/v0.5.9 /litestream-0.5.9 -linux-$ARCH.deb -O -L && \
17+ dpkg -i litestream-0.5.9 -linux-$ARCH.deb
1818
1919ADD https://astral.sh/uv/install.sh /uv-installer.sh
2020RUN sh /uv-installer.sh && rm /uv-installer.sh
You can’t perform that action at this time.
0 commit comments