mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-04-27 22:39:31 +07:00
chore: add single executable release build
This commit is contained in:
parent
2f6d96186a
commit
3a147f4133
46
README.md
46
README.md
@ -8,7 +8,7 @@ A simple admin web UI for [Garage](https://garagehq.deuxfleurs.fr/), a self-host
|
||||
|
||||
## Installation
|
||||
|
||||
The Garage Web UI is available as a Docker image. You can install it using the command line or with Docker Compose.
|
||||
The Garage Web UI is available as a single executable binary and docker image. You can install it using the command line or with Docker Compose.
|
||||
|
||||
### Docker CLI
|
||||
|
||||
@ -42,6 +42,50 @@ services:
|
||||
- 3909:3909
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
```sh
|
||||
$ wget -O garage-webui https://github.com/khairul169/garage-webui/releases/download/1.0.1/garage-webui-v1.0.1-linux-amd64
|
||||
$ chmod +x garage-webui
|
||||
$ sudo cp garage-webui /usr/local/bin
|
||||
```
|
||||
|
||||
Run the program with specified `garage.toml` config path.
|
||||
|
||||
```sh
|
||||
$ CONFIG_PATH=./garage.toml garage-webui
|
||||
```
|
||||
|
||||
If you want to run the program at startup, you may want to create a systemd service.
|
||||
|
||||
```sh
|
||||
$ sudo nano /etc/systemd/system/garage-webui.service
|
||||
```
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description=Garage Web UI
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment="PORT=3919"
|
||||
Environment="CONFIG_PATH=/etc/garage.toml"
|
||||
ExecStart=/usr/local/bin/garage-webui
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
```
|
||||
|
||||
Then reload and start the garage-webui service.
|
||||
|
||||
```sh
|
||||
$ sudo systemctl daemon-reload
|
||||
$ sudo systemctl enable --now garage-webui
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
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.
|
||||
|
20
misc/build-binaries.sh
Executable file
20
misc/build-binaries.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
BINARY=garage-webui
|
||||
VERSION=$(cat package.json | grep \"version\" | cut -d'"' -f 4)
|
||||
PLATFORMS="linux"
|
||||
ARCHITECTURES="386 amd64 arm arm64"
|
||||
|
||||
echo "Building version $VERSION"
|
||||
|
||||
cd backend && rm -rf dist && mkdir -p dist && cp -r ../dist ./ui/dist
|
||||
|
||||
for PLATFORM in $PLATFORMS; do
|
||||
for ARCH in $ARCHITECTURES; do
|
||||
echo "Building $PLATFORM-$ARCH"
|
||||
|
||||
GOOS=$PLATFORM GOARCH=$ARCH go build -o "dist/$BINARY-v$VERSION-$PLATFORM-$ARCH" -tags="prod" main.go
|
||||
done
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user