36 Commits

Author SHA1 Message Date
6e496fe42b Merge branch 'main' into monitoring
Some checks failed
continuous-integration/drone/pr Build is failing
2026-06-17 22:00:27 +00:00
5237068af1 add tests score
Some checks failed
continuous-integration/drone/pr Build is failing
2026-06-17 17:56:41 -04:00
7ad4b82d71 add score to readme 2026-06-17 17:55:00 -04:00
33d7d50884 update readme language 2026-06-17 17:54:34 -04:00
583c83cd56 add secrets to drone.yml 2026-06-17 17:52:41 -04:00
a907c6f695 Merge pull request 'feat: support scrape discovery' (#19) from export-metrics into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #19
Reviewed-by: Brooke <brooke@myco.systems>
2026-06-17 21:46:43 +00:00
f
7cd5a6f5dc doc: monitoring-ng sets its own token
Some checks failed
continuous-integration/drone/pr Build is failing
2026-06-16 22:50:16 -03:00
f
c3334ab580 feat: support scrape discovery
Some checks failed
continuous-integration/drone/pr Build is failing
2026-06-16 20:03:56 -03:00
796ee6c2d4 Merge pull request 'monitoring' (#15) from monitoring into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #15
2026-05-21 18:12:45 +00:00
b484236fea Merge branch 'main' into monitoring
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-21 18:12:08 +00:00
680e3850c5 Update README.md
Some checks failed
continuous-integration/drone/push Build is failing
2026-05-15 23:39:29 +00:00
dfb679b1c0 Merge branch 'main' into monitoring
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-15 20:32:10 +00:00
6e94e67109 Merge pull request 'Healthcheck & CI' (#17) from healthcheck into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #17
2026-05-15 20:29:49 +00:00
2717590054 update drone-ci
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-15 16:28:18 -04:00
d7637a6e6e basic healthcheck
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-15 16:23:06 -04:00
37dbb6caa8 update readme for clarity
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-15 16:11:39 -04:00
04463dffe8 scrap monitoring domain as it was too much of a headache to configure, use /metrics endpoint which seems fairly standard(?) 2026-05-15 16:09:13 -04:00
97e96ed1d3 move monitoring_enabled to .env file 2026-05-15 15:09:28 -04:00
88d46b767e set unique stack name
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-08 20:54:02 -04:00
baa4167a89 no idea if this actually works, pushing so that I can test later
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-08 16:58:37 -04:00
3741560b13 move secrets to compose.monitoring.yml
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-08 16:54:30 -04:00
46ba380e45 use compose_file env instead of a conditional in the .env file.
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-08 16:10:15 -04:00
ff778eab62 update readme with basic configuration
Some checks failed
continuous-integration/drone/pr Build is failing
2026-05-08 15:59:40 -04:00
aeb6675be4 setup conditional for garage.toml, set require metrics token to true 2026-05-08 15:59:27 -04:00
7d1b4ddc77 add monitoring conditional and secrets to .env 2026-05-08 15:59:09 -04:00
7e8571306a add secrets 2026-05-08 15:58:33 -04:00
16633d97e1 Merge pull request 'rpc_secret from file' (#13) from rpc_secret into main
Reviewed-on: #13
2026-05-08 19:06:04 +00:00
10be86624f bump config version 2026-05-08 15:00:42 -04:00
49b4a117c2 set rpc secret file and quote wrap 2026-05-08 15:00:33 -04:00
3101458354 set secret permissions to be non-world readable 2026-05-08 15:00:16 -04:00
b0ff30e72b chore: publish 0.0.2+v2.3.0 release 2026-05-01 09:42:56 -04:00
cf9676fd5f Merge pull request 'fix: proper length for rpc secret' (#7) from fixes into main
Reviewed-on: #7
Reviewed-by: marlon, brooke
2026-04-24 21:02:26 +00:00
f
1ebc2c2eca feat: set container hostname to domain
this allows finding the hostname on `garage status`
2026-04-21 20:47:45 -03:00
f
aded3647a9 fix: upgrade to 2.3.0 2026-04-17 11:23:30 -03:00
f
24c457a5d4 fix: proper length for rpc secret 2026-04-17 03:22:36 -03:00
22e218107e Merge pull request 'feat: support sqlite and other database engines' (#6) from sqlite into main
Reviewed-on: #6
2026-04-05 23:02:32 +00:00
7 changed files with 126 additions and 37 deletions

View File

@ -6,7 +6,7 @@ steps:
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings: settings:
host: swarm-test.autonomic.zone host: swarm-test.autonomic.zone
stack: example_com # UPDATE ME stack: garage
generate_secrets: true generate_secrets: true
purge: true purge: true
deploy_key: deploy_key:
@ -14,9 +14,12 @@ steps:
networks: networks:
- proxy - proxy
environment: environment:
DOMAIN: example.swarm-test.autonomic.zone # UPDATE ME DOMAIN: garage.swarm-test.autonomic.zone
STACK_NAME: example_com # UPDATE ME STACK_NAME: garage
LETS_ENCRYPT_ENV: production LETS_ENCRYPT_ENV: production
SECRET_RPC_SECRET_VERSION: v1 # length=64 charset=hex
SECRET_ADMIN_TOKEN_SECRET_VERSION: v1 # length=64 charset=hex
SECRET_METRICS_TOKEN_SECRET_VERSION: v1 # length=64 charset=hex
trigger: trigger:
branch: branch:
- main - main
@ -32,7 +35,7 @@ steps:
from_secret: drone_abra-bot_token from_secret: drone_abra-bot_token
fork: true fork: true
repositories: repositories:
- coop-cloud/auto-recipes-catalogue-json - toolshed/auto-recipes-catalogue-json
trigger: trigger:
event: tag event: tag

View File

@ -5,7 +5,12 @@ DOMAIN=garage.example.com
LETS_ENCRYPT_ENV=production LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml" COMPOSE_FILE="compose.yml"
SECRET_RPC_SECRET_VERSION=v1 # length=32 charset=hex SECRET_RPC_SECRET_VERSION=v1 # length=64 charset=hex
SECRET_ADMIN_TOKEN_SECRET_VERSION=v1 # length=64 charset=hex
SECRET_METRICS_TOKEN_SECRET_VERSION=v1 # length=64 charset=hex
#COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml"
#MONITORING_ENABLED=true
# Changing the replication factor after initial deployment is not # Changing the replication factor after initial deployment is not
# supported and requires deleting the existing cluster layout metadata. # supported and requires deleting the existing cluster layout metadata.

View File

@ -1,16 +1,16 @@
# garage # Garage
> An open-source distributed object storage service tailored for selfhosting at a small-to-medium scale. > An open-source distributed object storage service tailored for selfhosting at a small-to-medium scale.
<!-- metadata --> <!-- metadata -->
* **Category**: Apps * **Category**: Apps
* **Status**: wip * **Status**: 3
* **Image**: [`garage`](https://hub.docker.com/r/dxflrs/garage), 4, upstream * **Image**: [`garage`](https://hub.docker.com/r/dxflrs/garage), 4, upstream
* **Healthcheck**: No * **Healthcheck**: Yes
* **Backups**: No * **Backups**: No
* **Email**: N/A * **Email**: N/A
* **Tests**: No * **Tests**: 3
* **SSO**: N/A * **SSO**: N/A
<!-- endmetadata --> <!-- endmetadata -->
@ -52,7 +52,43 @@ You can optionally add this alias to your `.bashrc` (or similar) file to avoid h
### Garage Quick Start Guide ### Garage Quick Start Guide
Once `garage status` works, you can follow the guide here: https://garagehq.deuxfleurs.fr/documentation/quick-start/#checking-that-garage-runs-correctly Once `garage status` works, you can follow the guide here: https://garagehq.deuxfleurs.fr/documentation/quick-start/#checking-that-garage-runs-correctly
## Monitoring
### Enabling
By default monitoring is disabled and must be enabled in your config.
To enable, set `MONITORING` to `true` and uncomment the line `#COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml"`.
> If you've deployed garage before ver `0.0.2+v2.3.0` then you will need to add the following lines to your config:
> ```
> MONITORING_DOMAIN=monitoring.garage.example.com
> SECRET_ADMIN_TOKEN_SECRET_VERSION=v1 # length=64 charset=hex
> SECRET_METRICS_TOKEN_SECRET_VERSION=v1 # length=64 charset=hex
>
> #COMPOSE_FILE="$COMPOSE_FILE:compose.monitoring.yml"
> MONITORING="true"
> ```
If you're using the
[monitoring-ng](https://recipes.coopcloud.tech/monitoring-ng) recipe,
insert the `metrics_token` with the value of `basic_auth`:
```sh
abra app secret insert garage.example.coop v1 metrics_token BASIC_AUTH
```
### Deploying
Now, undeploy the service, generate the new secrets, and finally re-deploy:
```
abra app undeploy <app-domain>
abra app secret generate --all <app-domain>
abra app deploy <app-domain>
```
### Utilizing metrics
Within your chosen monitoring software (ie. Telegraf, Prometheus, etc.), you'll need to make sure it interprets the correct scheme (https), and point it at <app-domain>/metrics as the monitoring endpoint. The secret you copied earlier called metrics_token will be used to authenticate the request.
## Backups ## Backups
@ -60,12 +96,11 @@ Once `garage status` works, you can follow the guide here: https://garagehq.deux
By default, backups will only capture a snapshot of the metadata directory, which includes bucket names, hashed secrets, and other related information. By default, backups will only capture a snapshot of the metadata directory, which includes bucket names, hashed secrets, and other related information.
By default, the actual data will not be backed up! By default, the actual data will not be backed up!
If you're running Garage in a cluster, when you restore the metadata, other nodes will provide any missing data. If you're running Garage in a cluster, when you restore the metadata, other nodes will provide any missing data (assuming a replication factor >1).
### To enable full data backups ### To enable full data backups
* `abra app config <app domain>` * `abra app config <app domain>`
* Uncomment the block that starts with `## Enable Full Data Backups` * Uncomment the block that starts with `## Enable Full Data Backups`
* Re-deploy Garage: `abra app undeploy -n <app domain> && sleep 5 && abra app deploy -n <app domain>` * Re-deploy Garage: `abra app undeploy -n <app domain> && sleep 5 && abra app deploy -n <app domain>`
For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/). For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/).

View File

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

29
compose.monitoring.yml Normal file
View File

@ -0,0 +1,29 @@
---
version: "3.8"
services:
app:
secrets:
- source: metrics_token
mode: 0600
- source: admin_token
mode: 0600
deploy:
labels:
- "traefik.http.routers.${STACK_NAME}-metrics.rule=Host(`${DOMAIN}`) && Path(`/metrics`)"
- "traefik.http.routers.${STACK_NAME}-metrics.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}-metrics.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-metrics.service=${STACK_NAME}-metrics"
- "traefik.http.services.${STACK_NAME}-metrics.loadbalancer.server.port=3903"
- "prometheus.io/scrape=true"
- "prometheus.io/port=3903"
- "prometheus.io/path=/metrics"
- "prometheus.io/auth=bearer"
secrets:
admin_token:
name: ${STACK_NAME}_admin_token_${SECRET_ADMIN_TOKEN_SECRET_VERSION}
external: true
metrics_token:
name: ${STACK_NAME}_metrics_token_${SECRET_METRICS_TOKEN_SECRET_VERSION}
external: true

View File

@ -3,12 +3,14 @@ version: "3.8"
services: services:
app: app:
image: dxflrs/garage:v2.1.0 image: dxflrs/garage:v2.3.0
hostname: "${DOMAIN}"
configs: configs:
- source: garage_conf - source: garage_conf
target: /etc/garage.toml target: /etc/garage.toml
secrets: secrets:
- rpc_secret - source: rpc_secret
mode: 0600
networks: networks:
- proxy - proxy
- internal - internal
@ -21,16 +23,23 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.service=${STACK_NAME}"
- "traefik.tcp.routers.${STACK_NAME}-rpc.rule=HostSNI(`*`)" - "traefik.tcp.routers.${STACK_NAME}-rpc.rule=HostSNI(`*`)"
- "traefik.tcp.routers.${STACK_NAME}-rpc.entrypoints=garage-rpc" - "traefik.tcp.routers.${STACK_NAME}-rpc.entrypoints=garage-rpc"
- "traefik.tcp.services.${STACK_NAME}-rpc.loadbalancer.server.port=3901" - "traefik.tcp.services.${STACK_NAME}-rpc.loadbalancer.server.port=3901"
- "coop-cloud.${STACK_NAME}.version=0.0.1+2.1.0" - "coop-cloud.${STACK_NAME}.version=0.0.2+v2.3.0"
- "backupbot.backup=true" - "backupbot.backup=true"
- "backupbot.backup.pre-hook=/garage meta snapshot --all" - "backupbot.backup.pre-hook=/garage meta snapshot --all"
- "backupbot.backup.path=/var/lib/garage/meta/snapshots/,/var/lib/garage/meta/cluster_layout,/var/lib/garage/meta/data_layout,/var/lib/garage/meta/node_key,/var/lib/garage/meta/node_key.pub" - "backupbot.backup.path=/var/lib/garage/meta/snapshots/,/var/lib/garage/meta/cluster_layout,/var/lib/garage/meta/data_layout,/var/lib/garage/meta/node_key,/var/lib/garage/meta/node_key.pub"
volumes: volumes:
- "${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta" - "${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta"
- "${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data" - "${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data"
healthcheck:
test: ["CMD", "/garage", "status"]
interval: 30s
timeout: 10s
retries: 10
start_period: 10s
networks: networks:
proxy: proxy:

View File

@ -15,7 +15,7 @@ compression_level = 2
rpc_bind_addr = "[::]:3901" rpc_bind_addr = "[::]:3901"
rpc_public_addr = "{{ env "DOMAIN" }}:3901" rpc_public_addr = "{{ env "DOMAIN" }}:3901"
rpc_addr = "[::]:3901" rpc_addr = "[::]:3901"
rpc_secret = "{{ secret "rpc_secret" }}" rpc_secret_file = "/run/secrets/rpc_secret"
{{ if ne (env "BOOTSTRAP_ID") "" }} {{ if ne (env "BOOTSTRAP_ID") "" }}
bootstrap_peers = [ bootstrap_peers = [
@ -27,3 +27,11 @@ bootstrap_peers = [
s3_region = "garage" s3_region = "garage"
api_bind_addr = "[::]:3900" api_bind_addr = "[::]:3900"
root_domain = ".s3.garage" root_domain = ".s3.garage"
{{ if eq (env "MONITORING_ENABLED") "true" }}
[admin]
api_bind_addr = "[::]:3903"
admin_token_file = "/run/secrets/admin_token"
metrics_require_token = true
metrics_token_file = "/run/secrets/metrics_token"
{{ end }}