master
Evan Chen 2021-10-25 12:28:53 +08:00
parent 32f680ace1
commit 6b6ad975f3
4 changed files with 16 additions and 49 deletions

View File

@ -4,7 +4,20 @@ RUN curl -fsSL https://kumoly.io/attachments/a8b503db-8067-4323-9d1d-bc6e616af45
WORKDIR /src
COPY main.go main.go
RUN touch shell.sh
RUN echo '{"app_name":"Go Playground","no_reconfig":true \
,"files":[{"path":"main.go","name":"Main","action":"go run main.go","order":-1},{"path":"shell.sh","name":"Shell","action":"bash shell.sh","order":1}] \
,"hide_config":true}' > conf.json
RUN echo 'package main \
\
import "fmt" \
\
func main() { \
fmt.Println("Hello, world.") \
}' > main.go
CMD [ "configui", "-log", "configui.log", "-f","conf.json" ]

View File

@ -1,39 +0,0 @@
{
"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
}

View File

@ -5,5 +5,5 @@ services:
restart: always
ports:
- 127.0.0.1:8888:8000
volumes:
- ./conf.json:/src/conf.json
# volumes:
# - ./conf.json:/src/conf.json

View File

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