diff --git a/Makefile b/Makefile index 485a38d..2cc29b9 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ +SHELL:=/bin/bash VERSION?=v2.1.0 IMAGE?=garage:latest DOMAIN?=garage templates: - sed -e 's/VERSION/'"${VERSION}"'/g' Dockerfile.template > Dockerfile + VERSION="${VERSION}" DOMAIN="${DOMAIN}" ./process-templates.bash build: templates cloudron build -install: build +install: build uninstall cloudron install \ --location "${DOMAIN}" \ --secondary-domains \ @@ -16,6 +17,3 @@ install: build uninstall: cloudron uninstall --app "${DOMAIN}" - -update: - cloudron update \ No newline at end of file diff --git a/README.md b/README.md index 3edfb29..1b2c918 100644 --- a/README.md +++ b/README.md @@ -118,10 +118,10 @@ Garage is written in Rust, and distributed in multiple ways; this package is bui To build the package, ``` -make build +make build DOMAIN= ``` -This runs `cloudron build`, and may (on first run) request a path to a registry. You can configure a private registry on your own Cloudron for this purpose. +This runs `cloudron build`, and may (on first run) request a path to a registry. You can configure a private registry on your own Cloudron for this purpose. You need to pass the Cloudron domain here, so that the manifest can be set up correctly. ``` @@ -132,7 +132,7 @@ This runs `cloudron build`, and may (on first run) request a path to a registry. You can override the version built by passing the variable `VERSION`: ``` -make build VERSION=v2.1.0 +make build VERSION=v2.1.0 DOMAIN=s3.example.com ``` ### installing diff --git a/garage.toml b/garage.toml index 00a5828..fb100bb 100644 --- a/garage.toml +++ b/garage.toml @@ -21,15 +21,15 @@ rpc_bind_addr = "[::]:3901" rpc_secret_file = "/app/data/garage/rpc-secret" [s3_api] -s3_region = "garage" +s3_region = "us-east-1" api_bind_addr = "[::]:3900" -root_domain = ".CLOUDRON_APP_DOMAIN" +root_domain = "admin.CLOUDRON_APP_DOMAIN" [s3_web] bind_addr = "[::]:3902" # This wants to be set dynamically in the startup. # That way, it can grab a Cloudron variable. -root_domain = ".CLOUDRON_APP_DOMAIN" +root_domain = ".web.CLOUDRON_APP_DOMAIN" index = "index.html" # [k2v_api] diff --git a/process-templates.bash b/process-templates.bash new file mode 100755 index 0000000..8f60d68 --- /dev/null +++ b/process-templates.bash @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sed -e 's/VERSION/'"${VERSION}"'/g' Dockerfile.template > Dockerfile diff --git a/test-script.txt b/test-script.txt new file mode 100644 index 0000000..aeb784c --- /dev/null +++ b/test-script.txt @@ -0,0 +1,13 @@ +garage status +garage layout assign -z home -c 1G d785aad03f42dd47 +garage layout show +garage layout apply --version 1 +garage bucket create site +garage key create site-key +garage bucket allow \ + --read \ + --write \ + --owner \ + site \ + --key site-key +garage bucket website --allow site