update garage.toml and add required config settings

This commit is contained in:
brooke 2025-03-01 17:31:54 -05:00
parent 2aec565b40
commit 52b41e6643
4 changed files with 33 additions and 20 deletions

View File

@ -2,7 +2,15 @@ TYPE=garage
DOMAIN=garage.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.garage.example.com`'
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
SECRET_RPC_SECRET_VERSION=v1
###############################
##### 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

1
abra.sh Normal file
View File

@ -0,0 +1 @@
export GARAGE_CONF_VERSION=v2

View File

@ -4,6 +4,11 @@ version: "3.8"
services:
app:
image: dxflrs/garage:v1.0.0
configs:
- source: garage_conf
target: /etc/garage.toml
secrets:
- rpc_secret
networks:
- proxy
deploy:
@ -11,26 +16,30 @@ services:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3900"
- "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="
volumes:
- conf:/etc/garage.toml
- meta:/var/lib/garage/meta
- data:/var/lib/garage/data
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
networks:
proxy:
external: true
configs:
garage_conf:
name: ${STACK_NAME}_garage_conf_${GARAGE_CONF_VERSION}
file: garage.toml.tmpl
template_driver: golang
secrets:
rpc_secret:
name: ${STACK_NAME}_rpc_secret_${SECRET_RPC_SECRET_VERSION}
external: true
volumes:
meta:
data:

View File

@ -8,15 +8,10 @@ replication_factor = 3
compression_level = 2
rpc_bind_addr = "[::]:3901"
rpc_public_addr = "{{ env "DOMAIN" }}:3901"
rpc_secret = "<RPC secret>"
rpc_addr = "[::]:3901"
rpc_secret = "{{ secret "rpc_secret" }}"
[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
root_domain = ".s3.garage"
[s3_web]
bind_addr = "[::]:3902"
root_domain = ".web.garage"
index = "index.html"
root_domain = ".s3.garage"