mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-10-14 23:09: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
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
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)
|
[](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) ]
|
[ [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
|
### Docker CLI
|
||||||
|
|
||||||
```sh
|
```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
|
### Docker Compose
|
||||||
@ -31,7 +35,7 @@ If you install Garage using Docker, you can install this web UI alongside Garage
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
garage:
|
garage:
|
||||||
image: dxflrs/garage:v1.0.1
|
image: dxflrs/garage:v2.0.0
|
||||||
container_name: garage
|
container_name: garage
|
||||||
volumes:
|
volumes:
|
||||||
- ./garage.toml:/etc/garage.toml
|
- ./garage.toml:/etc/garage.toml
|
||||||
@ -45,7 +49,7 @@ services:
|
|||||||
- 3903:3903
|
- 3903:3903
|
||||||
|
|
||||||
webui:
|
webui:
|
||||||
image: khairul169/garage-webui:latest
|
image: adekabang/garage-webui:v2.0.0
|
||||||
container_name: garage-webui
|
container_name: garage-webui
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
@ -59,10 +63,10 @@ services:
|
|||||||
|
|
||||||
### Without Docker
|
### 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
|
```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
|
chmod +x garage-webui
|
||||||
sudo cp garage-webui /usr/local/bin
|
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.
|
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
|
```toml
|
||||||
metadata_dir = "/var/lib/garage/meta"
|
metadata_dir = "/var/lib/garage/meta"
|
||||||
data_dir = "/var/lib/garage/data"
|
data_dir = "/var/lib/garage/data"
|
||||||
db_engine = "sqlite"
|
db_engine = "sqlite"
|
||||||
metadata_auto_snapshot_interval = "6h"
|
|
||||||
|
|
||||||
replication_factor = 3
|
replication_factor = 3
|
||||||
compression_level = 2
|
compression_level = 2
|
||||||
|
|
||||||
rpc_bind_addr = "[::]:3901"
|
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"
|
rpc_secret = "YOUR_RPC_SECRET_HERE"
|
||||||
|
|
||||||
[s3_api]
|
[s3_api]
|
||||||
@ -130,7 +133,7 @@ bind_addr = "[::]:3902"
|
|||||||
root_domain = ".web.domain.com"
|
root_domain = ".web.domain.com"
|
||||||
index = "index.html"
|
index = "index.html"
|
||||||
|
|
||||||
[admin] # Required
|
[admin] # Required for Web UI
|
||||||
api_bind_addr = "[::]:3903"
|
api_bind_addr = "[::]:3903"
|
||||||
admin_token = "YOUR_ADMIN_TOKEN_HERE"
|
admin_token = "YOUR_ADMIN_TOKEN_HERE"
|
||||||
metrics_token = "YOUR_METRICS_TOKEN_HERE"
|
metrics_token = "YOUR_METRICS_TOKEN_HERE"
|
||||||
@ -188,7 +191,7 @@ cd backend && pnpm install && cd ..
|
|||||||
|
|
||||||
### Development with Docker
|
### 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
|
```sh
|
||||||
# Create necessary directories for Garage data
|
# Create necessary directories for Garage data
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
module khairul169/garage-webui
|
module Adekabang/garage-webui
|
||||||
|
|
||||||
go 1.23.0
|
go 1.23.0
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/router"
|
||||||
|
"Adekabang/garage-webui/ui"
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"khairul169/garage-webui/router"
|
|
||||||
"khairul169/garage-webui/ui"
|
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package middleware
|
package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"errors"
|
"errors"
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/schema"
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"khairul169/garage-webui/schema"
|
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/schema"
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"khairul169/garage-webui/schema"
|
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"khairul169/garage-webui/utils"
|
"Adekabang/garage-webui/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/utils"
|
||||||
"fmt"
|
"fmt"
|
||||||
"khairul169/garage-webui/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"khairul169/garage-webui/middleware"
|
"Adekabang/garage-webui/middleware"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"Adekabang/garage-webui/schema"
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"khairul169/garage-webui/schema"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
garage:
|
garage:
|
||||||
image: dxflrs/garage:v1.0.1
|
image: dxflrs/garage:v2.0.0
|
||||||
container_name: garage
|
container_name: garage
|
||||||
volumes:
|
volumes:
|
||||||
- ./garage.toml:/etc/garage.toml
|
- ./garage.toml:/etc/garage.toml
|
||||||
@ -14,7 +14,7 @@ services:
|
|||||||
- 3903:3903
|
- 3903:3903
|
||||||
|
|
||||||
webui:
|
webui:
|
||||||
image: khairul169/garage-webui:latest
|
image: adekabang/garage-webui:v2.0.0
|
||||||
container_name: garage-webui
|
container_name: garage-webui
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -741,8 +741,8 @@ import (
|
|||||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
|
|
||||||
"khairul169/garage-webui/schema"
|
"Adekabang/garage-webui/schema"
|
||||||
"khairul169/garage-webui/utils"
|
"Adekabang/garage-webui/utils"
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ services:
|
|||||||
- 3903:3903 # Admin API
|
- 3903:3903 # Admin API
|
||||||
|
|
||||||
webui:
|
webui:
|
||||||
image: khairul169/garage-webui:latest
|
image: adekabang/garage-webui:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./garage.toml:/etc/garage.toml:ro
|
- ./garage.toml:/etc/garage.toml:ro
|
||||||
ports:
|
ports:
|
||||||
@ -154,14 +154,14 @@ docker run -p 3909:3909 \
|
|||||||
-v ./garage.toml:/etc/garage.toml:ro \
|
-v ./garage.toml:/etc/garage.toml:ro \
|
||||||
-e API_BASE_URL="http://garage-host:3903" \
|
-e API_BASE_URL="http://garage-host:3903" \
|
||||||
-e API_ADMIN_KEY="your-admin-token" \
|
-e API_ADMIN_KEY="your-admin-token" \
|
||||||
khairul169/garage-webui:latest
|
adekabang/garage-webui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### 🖥️ Binary Deployment
|
### 🖥️ Binary Deployment
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Download the binary file
|
# 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
|
chmod +x garage-webui
|
||||||
|
|
||||||
# Run the service
|
# Run the service
|
||||||
@ -300,7 +300,7 @@ scrape_configs:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the project
|
# Clone the project
|
||||||
git clone https://github.com/khairul169/garage-webui.git
|
git clone https://github.com/Adekabang/garage-webui.git
|
||||||
cd garage-webui
|
cd garage-webui
|
||||||
|
|
||||||
# Install frontend dependencies
|
# Install frontend dependencies
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
IMAGE_NAME="khairul169/garage-webui"
|
IMAGE_NAME="adekabang/garage-webui"
|
||||||
PACKAGE_VERSION=$(cat package.json | grep \"version\" | cut -d'"' -f 4)
|
PACKAGE_VERSION=$(cat package.json | grep \"version\" | cut -d'"' -f 4)
|
||||||
|
|
||||||
echo "Building version $PACKAGE_VERSION"
|
echo "Building version $PACKAGE_VERSION"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "garage-webui",
|
"name": "garage-webui",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.9",
|
"version": "2.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev:client": "vite",
|
"dev:client": "vite",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user