diff --git a/.env.sample b/.env.sample index edb3431..c8c7521 100644 --- a/.env.sample +++ b/.env.sample @@ -7,18 +7,9 @@ COMPOSE_FILE="compose.yml" SECRET_RPC_SECRET_VERSION=v1 -REPLICATION_FACTOR=2 # changing the replication factor is not supported and requires deleting the existing cluster layout metadata. - -############################### -##### Map local directory ##### -############################### - -# If either meta or local is left blank (an empty string does not count it has to have no value) then it will default to the original docker volume -#COMPOSE_FILE="$COMPOSE_FILE:compose.localfs.yml" -#LOCAL_FOLDER_META -#LOCAL_FOLDER_DATA - -############################### + # Changing the replication factor after initial deployment is not + # supported and requires deleting the existing cluster layout metadata. +REPLICATION_FACTOR=2 CONSISTENCY_MODE=consistent METADATA_FSYNC=false @@ -26,3 +17,6 @@ DATA_FSYNC=false DISABLE_SCRUB=false BLOCK_SIZE=1MiB # only increase if there is a fast network connection between nodes +# Use a directory on the host instead of a docker volume for storage +#LOCAL_FOLDER_META=/path/on/docker/host +#LOCAL_FOLDER_DATA=/path/on/docker/host \ No newline at end of file diff --git a/abra.sh b/abra.sh index 7eca4b1..4c81e38 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1 @@ -export GARAGE_CONF_VERSION=v3 \ No newline at end of file +export GARAGE_CONF_VERSION=v4 \ No newline at end of file diff --git a/compose.localfs.yml b/compose.localfs.yml deleted file mode 100644 index 0a26619..0000000 --- a/compose.localfs.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -version: "3.8" - -services: - app: - image: dxflrs/garage:v1.0.0 - volumes: - - ${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta - - ${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data \ No newline at end of file diff --git a/compose.yml b/compose.yml index d63d422..f8adc20 100644 --- a/compose.yml +++ b/compose.yml @@ -20,10 +20,10 @@ services: - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "coop-cloud.${STACK_NAME}.version=" + - "coop-cloud.${STACK_NAME}.version=0.0.1+1.0.0" volumes: - - meta:/var/lib/garage/meta - - data:/var/lib/garage/data + - "${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta" + - "${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data" networks: proxy: diff --git a/garage.toml.tmpl b/garage.toml.tmpl index 8cdf8c4..4997bb4 100644 --- a/garage.toml.tmpl +++ b/garage.toml.tmpl @@ -4,11 +4,11 @@ db_engine = "lmdb" metadata_auto_snapshot_interval = "6h" replication_factor = {{ env "REPLICATION_FACTOR" }} -consistency_mode = {{ env "CONSISTENCY_MODE" }} +consistency_mode = '{{ env "CONSISTENCY_MODE" }}' metadata_fsync = {{ env "METADATA_FSYNC" }} data_fsync = {{ env "DATA_FSYNC" }} disable_scrub = {{ env "DISABLE_SCRUB" }} -block_size = {{ env "BLOCK_SIZE" }} +block_size = '{{ env "BLOCK_SIZE" }}' compression_level = 2