mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-10-14 14:59:32 +07:00
feat: upgrade Garage Web UI to version 2.0.0 and update module references
This commit is contained in:
parent
9e71200452
commit
667eab1565
3
LICENSE
3
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
|
||||
|
25
README.md
25
README.md
@ -2,7 +2,11 @@
|
||||
|
||||
[](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
|
||||
|
@ -1,4 +1,4 @@
|
||||
module khairul169/garage-webui
|
||||
module Adekabang/garage-webui
|
||||
|
||||
go 1.23.0
|
||||
|
||||
|
@ -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"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"Adekabang/garage-webui/utils"
|
||||
"errors"
|
||||
"khairul169/garage-webui/utils"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"Adekabang/garage-webui/utils"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"khairul169/garage-webui/utils"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"khairul169/garage-webui/utils"
|
||||
"Adekabang/garage-webui/utils"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"Adekabang/garage-webui/utils"
|
||||
"fmt"
|
||||
"khairul169/garage-webui/utils"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"khairul169/garage-webui/middleware"
|
||||
"Adekabang/garage-webui/middleware"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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:
|
||||
|
@ -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"
|
||||
)
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "garage-webui",
|
||||
"private": true,
|
||||
"version": "1.0.9",
|
||||
"version": "2.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev:client": "vite",
|
||||
|
Loading…
x
Reference in New Issue
Block a user