diff --git a/LICENSE b/LICENSE index 302d07b..762991a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2024 Khairul Hidayat +Copyright (c) 2024-2025 Khairul Hidayat +Copyright (c) 2025 Mohammad Raska (Adekabang) - Garage Web UI v2 upgrade Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c8e8a92..40bfe28 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ [![image](misc/img/garage-webui.png)](misc/img/garage-webui.png) -A simple admin web UI for [Garage](https://garagehq.deuxfleurs.fr/), a self-hosted, S3-compatible, distributed object storage service. +A modern admin web UI for [Garage v2](https://garagehq.deuxfleurs.fr/), a self-hosted, S3-compatible, distributed object storage service. + +> **Note**: This is version 2.0.0 of Garage Web UI, designed to work with Garage v2. If you're using Garage v1, please use the [v1.x release](https://github.com/Adekabang/garage-webui/releases/tag/1.0.9) of the Web UI instead. + +This project is based on [khairul169/garage-webui](https://github.com/khairul169/garage-webui), the original Garage Web UI project. The v2 upgrade is maintained by Mohammad Raska ([Adekabang](https://github.com/Adekabang)). [ [Screenshots](misc/SCREENSHOTS.md) | [Install Garage](https://garagehq.deuxfleurs.fr/documentation/quick-start/) | [Garage Git](https://git.deuxfleurs.fr/Deuxfleurs/garage) ] @@ -21,7 +25,7 @@ The Garage Web UI is available as a single executable binary and docker image. Y ### Docker CLI ```sh -docker run -p 3909:3909 -v ./garage.toml:/etc/garage.toml:ro --restart unless-stopped --name garage-webui khairul169/garage-webui:latest +docker run -p 3909:3909 -v ./garage.toml:/etc/garage.toml:ro --restart unless-stopped --name garage-webui adekabang/garage-webui:v2.0.0 ``` ### Docker Compose @@ -31,7 +35,7 @@ If you install Garage using Docker, you can install this web UI alongside Garage ```yml services: garage: - image: dxflrs/garage:v1.0.1 + image: dxflrs/garage:v2.0.0 container_name: garage volumes: - ./garage.toml:/etc/garage.toml @@ -45,7 +49,7 @@ services: - 3903:3903 webui: - image: khairul169/garage-webui:latest + image: adekabang/garage-webui:v2.0.0 container_name: garage-webui restart: unless-stopped volumes: @@ -59,10 +63,10 @@ services: ### Without Docker -Get the latest binary from the [release page](https://github.com/khairul169/garage-webui/releases/latest) according to your OS architecture. For example: +Get the latest binary from the [release page](https://github.com/Adekabang/garage-webui/releases/latest) according to your OS architecture. For example: ```sh -wget -O garage-webui https://github.com/khairul169/garage-webui/releases/download/1.0.9/garage-webui-v1.0.9-linux-amd64 +wget -O garage-webui https://github.com/Adekabang/garage-webui/releases/download/2.0.0/garage-webui-v2.0.0-linux-amd64 chmod +x garage-webui sudo cp garage-webui /usr/local/bin ``` @@ -105,19 +109,18 @@ sudo systemctl enable --now garage-webui To simplify installation, the Garage Web UI uses values from the Garage configuration, such as `rpc_public_addr`, `admin.admin_token`, `s3_web.root_domain`, etc. -Example content of `config.toml`: +Example content of `garage.toml` for Garage v2: ```toml metadata_dir = "/var/lib/garage/meta" data_dir = "/var/lib/garage/data" db_engine = "sqlite" -metadata_auto_snapshot_interval = "6h" replication_factor = 3 compression_level = 2 rpc_bind_addr = "[::]:3901" -rpc_public_addr = "localhost:3901" # Required +rpc_public_addr = "localhost:3901" # Required for Web UI rpc_secret = "YOUR_RPC_SECRET_HERE" [s3_api] @@ -130,7 +133,7 @@ bind_addr = "[::]:3902" root_domain = ".web.domain.com" index = "index.html" -[admin] # Required +[admin] # Required for Web UI api_bind_addr = "[::]:3903" admin_token = "YOUR_ADMIN_TOKEN_HERE" metrics_token = "YOUR_METRICS_TOKEN_HERE" @@ -188,7 +191,7 @@ cd backend && pnpm install && cd .. ### Development with Docker -For development with Docker, a `docker-compose.dev.yml` file is provided with 4 Garage instances: +For development with Docker, a `docker-compose.dev.yml` file is provided with 4 Garage v2 instances: ```sh # Create necessary directories for Garage data diff --git a/backend/go.mod b/backend/go.mod index 0423efc..72397c5 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,4 +1,4 @@ -module khairul169/garage-webui +module Adekabang/garage-webui go 1.23.0 diff --git a/backend/main.go b/backend/main.go index a69ffbe..32f54cd 100644 --- a/backend/main.go +++ b/backend/main.go @@ -1,10 +1,10 @@ package main import ( + "Adekabang/garage-webui/router" + "Adekabang/garage-webui/ui" + "Adekabang/garage-webui/utils" "fmt" - "khairul169/garage-webui/router" - "khairul169/garage-webui/ui" - "khairul169/garage-webui/utils" "log" "net/http" "os" diff --git a/backend/middleware/auth.go b/backend/middleware/auth.go index 9c8bbc1..6fed384 100644 --- a/backend/middleware/auth.go +++ b/backend/middleware/auth.go @@ -1,8 +1,8 @@ package middleware import ( + "Adekabang/garage-webui/utils" "errors" - "khairul169/garage-webui/utils" "net/http" ) diff --git a/backend/router/auth.go b/backend/router/auth.go index 9c425ab..6c038d3 100644 --- a/backend/router/auth.go +++ b/backend/router/auth.go @@ -1,9 +1,9 @@ package router import ( + "Adekabang/garage-webui/utils" "encoding/json" "errors" - "khairul169/garage-webui/utils" "net/http" "strings" diff --git a/backend/router/browse.go b/backend/router/browse.go index fce0303..ad42717 100644 --- a/backend/router/browse.go +++ b/backend/router/browse.go @@ -1,13 +1,13 @@ package router import ( + "Adekabang/garage-webui/schema" + "Adekabang/garage-webui/utils" "context" "encoding/json" "errors" "fmt" "io" - "khairul169/garage-webui/schema" - "khairul169/garage-webui/utils" "net/http" "strconv" "strings" diff --git a/backend/router/buckets.go b/backend/router/buckets.go index bbd92b2..d2aeacc 100644 --- a/backend/router/buckets.go +++ b/backend/router/buckets.go @@ -1,10 +1,10 @@ package router import ( + "Adekabang/garage-webui/schema" + "Adekabang/garage-webui/utils" "encoding/json" "fmt" - "khairul169/garage-webui/schema" - "khairul169/garage-webui/utils" "net/http" ) diff --git a/backend/router/config.go b/backend/router/config.go index aca0155..384cb92 100644 --- a/backend/router/config.go +++ b/backend/router/config.go @@ -1,7 +1,7 @@ package router import ( - "khairul169/garage-webui/utils" + "Adekabang/garage-webui/utils" "net/http" ) diff --git a/backend/router/proxy.go b/backend/router/proxy.go index 73c6a16..25894f2 100644 --- a/backend/router/proxy.go +++ b/backend/router/proxy.go @@ -1,8 +1,8 @@ package router import ( + "Adekabang/garage-webui/utils" "fmt" - "khairul169/garage-webui/utils" "net/http" "net/http/httputil" "net/url" diff --git a/backend/router/router.go b/backend/router/router.go index 1cf3134..d4c1b5a 100644 --- a/backend/router/router.go +++ b/backend/router/router.go @@ -1,7 +1,7 @@ package router import ( - "khairul169/garage-webui/middleware" + "Adekabang/garage-webui/middleware" "net/http" ) diff --git a/backend/utils/garage.go b/backend/utils/garage.go index bde29ab..ca691a9 100644 --- a/backend/utils/garage.go +++ b/backend/utils/garage.go @@ -1,12 +1,12 @@ package utils import ( + "Adekabang/garage-webui/schema" "bytes" "encoding/json" "errors" "fmt" "io" - "khairul169/garage-webui/schema" "log" "net/http" "os" diff --git a/docker-compose.yml b/docker-compose.yml index c22a381..db3cbb1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: garage: - image: dxflrs/garage:v1.0.1 + image: dxflrs/garage:v2.0.0 container_name: garage volumes: - ./garage.toml:/etc/garage.toml @@ -14,7 +14,7 @@ services: - 3903:3903 webui: - image: khairul169/garage-webui:latest + image: adekabang/garage-webui:v2.0.0 container_name: garage-webui restart: unless-stopped volumes: diff --git a/docs/STYLE_GUIDE.md b/docs/STYLE_GUIDE.md index 1f8bcb0..403ccaf 100644 --- a/docs/STYLE_GUIDE.md +++ b/docs/STYLE_GUIDE.md @@ -741,8 +741,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/joho/godotenv" - "khairul169/garage-webui/schema" - "khairul169/garage-webui/utils" + "Adekabang/garage-webui/schema" + "Adekabang/garage-webui/utils" ) ``` diff --git a/docs/garage-webui-management-docs.md b/docs/garage-webui-management-docs.md index 5cfaccd..8b9dfbc 100644 --- a/docs/garage-webui-management-docs.md +++ b/docs/garage-webui-management-docs.md @@ -137,7 +137,7 @@ services: - 3903:3903 # Admin API webui: - image: khairul169/garage-webui:latest + image: adekabang/garage-webui:latest volumes: - ./garage.toml:/etc/garage.toml:ro ports: @@ -154,14 +154,14 @@ docker run -p 3909:3909 \ -v ./garage.toml:/etc/garage.toml:ro \ -e API_BASE_URL="http://garage-host:3903" \ -e API_ADMIN_KEY="your-admin-token" \ - khairul169/garage-webui:latest + adekabang/garage-webui:latest ``` ### 🖥️ Binary Deployment ```bash # Download the binary file -wget -O garage-webui https://github.com/khairul169/garage-webui/releases/download/1.0.9/garage-webui-v1.0.9-linux-amd64 +wget -O garage-webui https://github.com/Adekabang/garage-webui/releases/download/1.0.9/garage-webui-v1.0.9-linux-amd64 chmod +x garage-webui # Run the service @@ -300,7 +300,7 @@ scrape_configs: ```bash # Clone the project -git clone https://github.com/khairul169/garage-webui.git +git clone https://github.com/Adekabang/garage-webui.git cd garage-webui # Install frontend dependencies diff --git a/misc/build-docker.sh b/misc/build-docker.sh index 5716288..db80aca 100755 --- a/misc/build-docker.sh +++ b/misc/build-docker.sh @@ -2,7 +2,7 @@ set -e -IMAGE_NAME="khairul169/garage-webui" +IMAGE_NAME="adekabang/garage-webui" PACKAGE_VERSION=$(cat package.json | grep \"version\" | cut -d'"' -f 4) echo "Building version $PACKAGE_VERSION" diff --git a/package.json b/package.json index 4ca77be..d8087ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "garage-webui", "private": true, - "version": "1.0.9", + "version": "2.0.0", "type": "module", "scripts": { "dev:client": "vite",