master
Evan Chen 2021-10-24 03:51:48 +08:00
commit cbd7bf0c51
5 changed files with 67 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM golang:1.17.2
RUN curl -fsSL https://kumoly.io/attachments/f74b4920-2798-4a01-ade2-8bb22171a949 | tar -C /usr/local/bin/ -xz
WORKDIR /src
COPY main.go main.go
RUN touch shell.sh
CMD [ "configui", "-log", "configui.log", "-f","conf.json" ]

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# Go Playground

39
conf.json Normal file
View File

@ -0,0 +1,39 @@
{
"app_name": "Go Playground",
"config_path": "/data/configui.json",
"no_reconfig": true,
"allow_ip": "",
"files": [
{
"path": "main.go",
"name": "Main",
"action": "go run main.go",
"ro": false,
"lang": "",
"order": -1,
"data": ""
},
{
"path": "shell.sh",
"name": "Shell",
"action": "bash shell.sh",
"ro": false,
"lang": "",
"order": 1,
"data": ""
},
{
"path": "./configui.log",
"name": "log",
"action": "",
"ro": false,
"lang": "",
"order": 2,
"data": ""
}
],
"result_bellow": false,
"hide_config": true,
"log_path": "/var/log/configui.log",
"silent_sys_out": false
}

9
docker-compose.yaml Normal file
View File

@ -0,0 +1,9 @@
services:
go-playground:
build: .
container_name: go-playground
restart: always
ports:
- 127.0.0.1:18000:8000
volumes:
- ./conf.json:/src/conf.json

7
main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, world.")
}