From 8ba57b75397af1465489580dee143daef530a598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B5=A9=E9=BA=9F?= Date: Fri, 10 Apr 2020 14:38:15 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=A1=A5=E5=85=85test=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 +--- README.md | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87e8c872..deb9911c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,5 @@ name: release -on: - release: - types: [published] +on: [push] jobs: goreleaser: runs-on: ubuntu-latest diff --git a/README.md b/README.md index c8e772ea..9e98c901 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Test](https://github.com/gwuhaolin/livego/workflows/Test/badge.svg) + # livego Simple and efficient live broadcast server: - Very simple to install and use; From 3da66e78039f2f935a9686c0ca25d3b6580b9cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B5=A9=E9=BA=9F?= Date: Fri, 10 Apr 2020 14:45:55 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index deb9911c..87e8c872 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,7 @@ name: release -on: [push] +on: + release: + types: [published] jobs: goreleaser: runs-on: ubuntu-latest From 5219d1c1c273aefbae4848398b96c6104b4246f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B5=A9=E9=BA=9F?= Date: Fri, 10 Apr 2020 15:13:29 +0800 Subject: [PATCH 3/6] fix: support run without config file close https://github.com/gwuhaolin/livego/issues/74 --- configure/liveconfig.go | 18 ++++++++++-------- config/livego.json => livego.json | 2 +- main.go | 7 ++----- 3 files changed, 13 insertions(+), 14 deletions(-) rename config/livego.json => livego.json (73%) diff --git a/configure/liveconfig.go b/configure/liveconfig.go index af5350cb..eeb29f9e 100644 --- a/configure/liveconfig.go +++ b/configure/liveconfig.go @@ -45,28 +45,30 @@ type ServerCfg struct { Server []Application `json:"server"` } -var RtmpServercfg ServerCfg +// default config +var RtmpServercfg = ServerCfg{ + Server: []Application{{ + Appname: "livego", + Liveon: "on", + Hlson: "on", + StaticPush: nil, + }}, +} -func LoadConfig(configfilename string) error { +func LoadConfig(configfilename string) { log.Printf("starting load configure file %s", configfilename) data, err := ioutil.ReadFile(configfilename) if err != nil { log.Printf("ReadFile %s error:%v", configfilename, err) - return err } - // log.Printf("loadconfig: \r\n%s", string(data)) - err = json.Unmarshal(data, &RtmpServercfg) if err != nil { log.Printf("json.Unmarshal error:%v", err) - return err } log.Printf("get config json data:%v", RtmpServercfg) Init() - - return nil } func GetKeyFile() *string { diff --git a/config/livego.json b/livego.json similarity index 73% rename from config/livego.json rename to livego.json index 47bab74c..5a6e195a 100644 --- a/config/livego.json +++ b/livego.json @@ -1,7 +1,7 @@ { "server": [ { - "appname": "live", + "appname": "livego", "liveon": "on", "hlson": "on" } diff --git a/main.go b/main.go index 09575bc8..8cf1790a 100755 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ var ( httpFlvAddr = flag.String("httpflv-addr", ":7001", "HTTP-FLV server listen address") hlsAddr = flag.String("hls-addr", ":7002", "HLS server listen address") operaAddr = flag.String("manage-addr", ":8090", "HTTP manage interface server listen address") - configfilename = flag.String("config-file", "config/livego.json", "configure filename") + configfilename = flag.String("config-file", "livego.json", "configure filename") ) func init() { @@ -116,10 +116,7 @@ func main() { } }() log.Println("start livego, version", version) - err := configure.LoadConfig(*configfilename) - if err != nil { - return - } + configure.LoadConfig(*configfilename) stream := rtmp.NewRtmpStream() hlsServer := startHls() From 11c01b42bb5325fff98a489182d00a47e0000ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B5=A9=E9=BA=9F?= Date: Fri, 10 Apr 2020 15:37:04 +0800 Subject: [PATCH 4/6] docs: add logo --- Dockerfile | 2 -- README.md | 4 +++- logo.png | Bin 0 -> 5482 bytes 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 logo.png diff --git a/Dockerfile b/Dockerfile index 37aa7d11..ed646709 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,12 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o livego . FROM alpine:latest -LABEL maintainer="Ruben Cid Lara " RUN mkdir -p /app/config WORKDIR /app ENV RTMP_PORT 1935 ENV HTTP_FLV_PORT 7001 ENV HLS_PORT 7002 ENV HTTP_OPERATION_PORT 8090 -COPY --from=builder /app/config ./config COPY --from=builder /app/livego . EXPOSE ${RTMP_PORT} EXPOSE ${HTTP_FLV_PORT} diff --git a/README.md b/README.md index 9e98c901..4172a0dc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ![Test](https://github.com/gwuhaolin/livego/workflows/Test/badge.svg) + + # livego Simple and efficient live broadcast server: - Very simple to install and use; @@ -25,7 +27,7 @@ Simple and efficient live broadcast server: After directly downloading the compiled [binary file](https://github.com/gwuhaolin/livego/releases), execute it on the command line. #### Boot from Docker -Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -d --name livego gnurub/livego` to start +Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -d --name livego docker.pkg.github.com/gwuhaolin/livego:latest` to start #### Compile from source 1. Download the source code `git clone https://github.com/gwuhaolin/livego.git` diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..cd578a6a2c62074fa3353ccf96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Y|9N`atY&O*+r2@&`<%&3L2 Date: Fri, 10 Apr 2020 15:40:28 +0800 Subject: [PATCH 5/6] docs: add logo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4172a0dc..615f1387 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ -# livego Simple and efficient live broadcast server: - Very simple to install and use; - Pure Golang, high performance, cross-platform; From c04c62a665b2623051521a2458209a89c1c2c882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=B5=A9=E9=BA=9F?= Date: Fri, 10 Apr 2020 15:46:56 +0800 Subject: [PATCH 6/6] docs: fix docker name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 615f1387..0b07b6c4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Simple and efficient live broadcast server: After directly downloading the compiled [binary file](https://github.com/gwuhaolin/livego/releases), execute it on the command line. #### Boot from Docker -Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -d --name livego docker.pkg.github.com/gwuhaolin/livego:latest` to start +Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -d --name livego gwuhaolin/livego` to start #### Compile from source 1. Download the source code `git clone https://github.com/gwuhaolin/livego.git`