We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf54e92 commit ad0ef20Copy full SHA for ad0ef20
Aptfile
@@ -0,0 +1 @@
1
+https://github.com/benbjohnson/litestream/releases/download/v0.3.13/litestream-v0.3.13-linux-amd64.deb
Procfile
+worker: ./start.sh
start.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
2
+
3
+START_COMMAND=heimdallr
4
5
+set -e
6
+set -u
7
+set -x
8
9
+litestream version
10
+echo "DB_REPLICA_URL=${DB_REPLICA_URL}"
11
12
+readonly DB_PATH='heimdallr.db'
13
14
+if [[ -f "$DB_PATH" ]]; then
15
+ echo "Existing database is $(stat -c %s "${DB_PATH}") bytes"
16
+else
17
+ echo "Restoring database from replica"
18
+ litestream restore -if-replica-exists -v "${DB_PATH}"
19
+fi
20
21
+litestream replicate -exec "${START_COMMAND}"
0 commit comments