Go to file
evanchen 02b7446064
continuous-integration/drone/tag Build was killed Details
更新 '.drone.yml'
2021-10-23 19:10:19 +00:00
cmd/configui
…
docs
…
public 0.1.2-rc1 2021-10-24 01:23:57 +08:00
src 0.1.2-rc1 2021-10-24 01:23:57 +08:00
templates fix: app name not showing in title 2021-10-24 02:43:26 +08:00
.dockerignore
…
.drone.yml 更新 '.drone.yml' 2021-10-23 19:10:19 +00:00
.gitignore
…
CHANGELOG.md
…
Dockerfile
…
Makefile 0.1.2-rc1 2021-10-24 01:23:57 +08:00
README.md
…
app.go fix: remove build info from lib 2021-10-24 01:40:11 +08:00
configui.go fix: remove build info from lib 2021-10-24 01:40:11 +08:00
file.go
…
go.mod
…
handler.go
…
log.go 0.1.2-rc1 2021-10-24 01:23:57 +08:00
netutil.go
…
package-lock.json
…
package.json
…
release.sh fix: no git in docker 2021-10-24 02:15:38 +08:00
server.go
…
util.go
…

README.md

Config UI

a web app to edit and action on update powered by ACE

Usage: configui [options]
  -allow string
        IPs to allow, blank to allow all
  -bind string
        address to bind (default "0.0.0.0:8000")
  -c string
        cmd to apply
  -f string
        path to config file
  -log string
        log to file
  -n string
        Name of file
  -p string
        path to file, precedence over config
  -static
        disable config api
  -v    show version

Install

sudo rm -f /usr/local/bin/configui
sudo sh -c "curl -fsSL RELEASE_URL | tar -C /usr/local/bin/ -xz"

Config

[
	{
		"path": "configui.log",
		"ro": true
	},
	{
		"path": "etc/test.ini",
		"name": "test",
		"action": "myip local -P"
	}
]

configui -f PATH/TO/CONFIG

Systemd

; /etc/systemd/system/configui.service
[Unit]
Description=CoonfigUI Server

[Service]
WorkingDirectory=/home/ubuntu/ConfigUI
ExecStart=configui -log access.log -f conf.json -bind 0.0.0.0:80
Restart=always

[Install]
WantedBy=multi-user.target

Api

Files

GET /api/files

res:

{
  "test": {
    "path": "test",
    "name": "test",
    "action": "myip local -P",
    "data": ""
  }
}

File

GET /api/file?name=Name

res:

{
  "action": "myip local -P",
  "data": "test",
  "name": "test",
  "path": "test"
}

Update

POST /api/file

req:

{
  "data": "test",
  "name": "test",
}

Apply

POST /api/apply?name=Name