commit 0d5dbcae2c7e85c446626e852d39fe8b90d342ca Author: Matt Jadud Date: Sat Dec 6 08:19:05 2025 -0500 First commit diff --git a/CloudronManifest.json b/CloudronManifest.json new file mode 100644 index 0000000..3aa5384 --- /dev/null +++ b/CloudronManifest.json @@ -0,0 +1,36 @@ +{ + "id": "com.jadud.garage", + "title": "Garage", + "version": "0.0.1", + "healthCheckPath": "/", + "multiDomain": true, + "httpPort": 80, + "httpPorts": { + "GARAGE_S3": { + "title": "Garage S3 Server Domain", + "description": "The domain name for the Garage S3 API", + "containerPort": 3900, + "defaultValue": "garage-s3" + }, + "GARAGE_RPC": { + "title": "Garage RPC Server Domain", + "description": "The domain name for the Garage RPC", + "containerPort": 3901, + "defaultValue": "garage-rpc" + }, + "GARAGE_WEB": { + "title": "Garage WEB Server Domain", + "description": "The domain name for the Garage web server", + "containerPort": 3902, + "defaultValue": "garage-web" + } + }, + "addons": { + "localstorage": {} + }, + "runtimeDirs": [ + "/app/code/garage" + ], + "manifestVersion": 2, + "icon": "" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..967f9c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM cloudron/base:5.0.0 AS base + +# RUN apt-get update ; apt-get install -y \ +# curl + +WORKDIR /app/bin +ADD https://garagehq.deuxfleurs.fr/_releases/v2.1.0/aarch64-unknown-linux-musl/garage /app/bin/garage + +# Garage wants these directories for storing stuff. +# We want it here so that /app/data gets backed up. +RUN mkdir -p /app/data/garage/data /app/data/garage/meta + +WORKDIR /app/data +COPY garage.toml /app/data/garage.toml + +ADD start.bash /app/data/start.bash +CMD [ "/app/data/start.bash" ] \ No newline at end of file diff --git a/garage.toml b/garage.toml new file mode 100644 index 0000000..779c191 --- /dev/null +++ b/garage.toml @@ -0,0 +1,30 @@ +# There are many parameters +# https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ + +metadata_dir = "/app/data/garage/meta" +data_dir = "/app/data/garage/data" +db_engine = "sqlite" + +replication_factor = 1 + +[s3_api] +s3_region = "garage" +api_bind_addr = "[::]:3900" +root_domain = ".s3.garage.localhost" + +rpc_bind_addr = "[::]:3901" +rpc_public_addr = "127.0.0.1:3901" +rpc_secret = "$(openssl rand -hex 32)" + +[s3_web] +bind_addr = "[::]:3902" +root_domain = ".web.garage.localhost" +index = "index.html" + +# [k2v_api] +# api_bind_addr = "[::]:3904" + +# [admin] +# api_bind_addr = "[::]:3903" +# admin_token = "$(openssl rand -base64 32)" +# metrics_token = "$(openssl rand -base64 32)" \ No newline at end of file diff --git a/start.bash b/start.bash new file mode 100644 index 0000000..1c6b431 --- /dev/null +++ b/start.bash @@ -0,0 +1,5 @@ +#!/bin/bash + +RUST_LOG=garage=debug +chown -R cloudron:cloudron /app/data +gosu cloudron:cloudron garage -c /app/data/garage.toml server