Skip to content

Commit

Permalink
fix: litestream-entrypoint now takes a required BUCKET_PATH argument
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasRosenstein committed Oct 14, 2024
1 parent 69a680e commit 1e75ebc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions headscale-fly-io/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ main() {
write_noise_private_key
write_config
maybe_idle
export BUCKET_PATH="headscale.db"
export LITESTREAM_DATABASE_PATH=/var/lib/headscale/db.sqlite
info_run exec /etc/headscale/litestream-entrypoint.sh "headscale serve"
}
Expand Down
9 changes: 5 additions & 4 deletions headscale-fly-io/litestream-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ write_config() {
assert_is_set AWS_REGION
assert_is_set AWS_ENDPOINT_URL_S3
assert_is_set BUCKET_NAME
assert_is_set BUCKET_PATH
assert_is_set AGE_SECRET_KEY
assert_is_set LITESTREAM_DATABASE_PATH

Expand All @@ -92,10 +93,10 @@ dbs:
replicas:
# See https://litestream.io/reference/config/#s3-replica
- type: s3
bucket: $BUCKET_NAME
path: headscale.db
region: $AWS_REGION
endpoint: $AWS_ENDPOINT_URL_S3
bucket: "$BUCKET_NAME"
path: "$BUCKET_PATH"
region: "$AWS_REGION"
endpoint: '$AWS_ENDPOINT_URL_S3'
# See https://litestream.io/reference/config/#replica-settings
sync-interval: "${LITESTREAM_SYNC_INTERVAL:-10s}"
# See https://litestream.io/reference/config/#encryption
Expand Down

0 comments on commit 1e75ebc

Please sign in to comment.