From 6c7d14a7c9ae3c1e675b7f8f4eef5cff9f286aba Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Sat, 17 Feb 2024 13:58:36 +0100 Subject: [PATCH] first commit --- README.md | 30 ++++++++++++++++ manifest.yaml | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 README.md create mode 100644 manifest.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..beb0f85 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +Inspired by [linkding on fly.io](https://github.com/fspoettel/linkding-on-fly) + +## Storing the state in s3 + +You'll an s3 compatible bucket, like backblaze, aws, cloudflare or any compatible provider. Litestream will restore the bucket in an `emptyDir`. Then during operation a `litestream` sidecar will live replicate the changes to s3. + +## Contents of `manifest.yaml` + + - a `Namespace` for the project + - a `ConfigMap` containing `litestream.yml` config + - replace `$S3_ENDPOINT` with your bucket config + - a `StatefulSet` containing + - an `initContainer` to restore the sqlite db + - a `Pod` with `linkding` + `litestream` official images + - a `Service` to expose the pods + - I'm using tailscale annotations, replace these with traefik or your favorite ingress controller stuff. + +## Setup + +``` +$ export S3_ENDPOINT= +$ export S3_BUCKET= +$ export S3_PATH= +$ export S3_ACCESS_KEY_ID= +$ export S3_SECRET_ACCESS_KEY= +$ envsubst