feat: support sqlite and other database engines #6

Merged
marlon merged 2 commits from sqlite into main 2026-04-05 23:02:33 +00:00
3 changed files with 5 additions and 4 deletions

View File

@ -11,6 +11,7 @@ SECRET_RPC_SECRET_VERSION=v1 # length=32 charset=hex
# supported and requires deleting the existing cluster layout metadata.
REPLICATION_FACTOR=2
DATABASE_ENGINE=lmdb
Review

Seems like it might need a release note to explain?

Seems like it might need a release note to explain?
Review

i didn't think of it because it keeps the current behaviour intact!

i didn't think of it because it keeps the current behaviour intact!
Review

For existing deployments, you need to add DATABASE_ENGINE to your .env or your upgrade will fail.

For existing deployments, you need to add `DATABASE_ENGINE` to your `.env` or your upgrade will fail.
Review

oh yeah, but abra app deploy also warns of missing env vars, right? i'll add a release note anyway, unless there's a default value for the env template function?

oh yeah, but abra app deploy also warns of missing env vars, right? i'll add a release note anyway, unless there's a default value for the env template function?
Review

Yes, it warns but a release note is also good because people ignore warnings 😜 I don't think you can do a default env values, no 😬 Thanks!

Yes, it warns but a release note is also good because people ignore warnings 😜 I don't think you can do a default env values, no 😬 Thanks!
CONSISTENCY_MODE=consistent
METADATA_FSYNC=false
DATA_FSYNC=false
@ -27,4 +28,4 @@ BLOCK_SIZE=1MiB # only increase if there is a fast network connection between no
#LOCAL_FOLDER_DATA=/path/on/docker/host
## Enable Full Data Backups (not just metadata)
# COMPOSE_FILE="$COMPOSE_FILE:compose.fullbackup.yml"
# COMPOSE_FILE="$COMPOSE_FILE:compose.fullbackup.yml"

View File

@ -1 +1 @@
export GARAGE_CONF_VERSION=v4
export GARAGE_CONF_VERSION=v5

View File

@ -1,6 +1,6 @@
metadata_dir = "/var/lib/garage/meta"
data_dir = "/var/lib/garage/data"
db_engine = "lmdb"
db_engine = "{{ if env "DATABASE_ENGINE" }}{{ env "DATABASE_ENGINE" }}{{ else }}lmdb{{ end }}"
decentral1se marked this conversation as resolved Outdated

You need to thread DATABASE_ENGINE into the compose.yml and keep the default of lmdb?

You need to thread `DATABASE_ENGINE` into the `compose.yml` and keep the default of `lmdb`?
Outdated
Review

i can't parse this phrase 🤔

i can't parse this phrase 🤔

Ah, sorry, I thought you might need to add it to an environment: ... part in the compose.yml but you're using it directly in the .tmpl file. Ignore me 🙃

Ah, sorry, I thought you might need to add it to an `environment: ...` part in [the compose.yml](https://git.coopcloud.tech/coop-cloud/garage/src/branch/main/compose.yml#L5) but you're using it directly in the `.tmpl` file. Ignore me 🙃
metadata_auto_snapshot_interval = "6h"
replication_factor = {{ env "REPLICATION_FACTOR" }}
@ -26,4 +26,4 @@ bootstrap_peers = [
[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
root_domain = ".s3.garage"
root_domain = ".s3.garage"