Compare commits

...

3 Commits

Author SHA1 Message Date
dexter
0faada1a13 UI增加视频广场,GB彻底重写,rtsp修复bug,engine消除内存泄露 2022-02-24 11:35:04 +08:00
dexter
3ffa4ab8b6 Merge pull request #30 from pdnews/3.0
添加 Dockerfile,并更新 Readme
2022-02-02 09:21:13 +08:00
杨树海
ac742d07cf 添加 Dockerfile,并更新 Readme 2022-02-01 21:19:44 +08:00
5 changed files with 78 additions and 14 deletions

View File

@@ -67,8 +67,16 @@ to submit your own plugin
|hls||✔|✔|
|ws-flv|||✔|
|webrtc|✔||✔
# Documentation
# Build & Test with docker
> development and testing only: IP and udp ports need to be exposed carefully in production.
```shell
docker build . -f dockerfile -t m7s:3.0
docker run --name m7s -p 1935:1935 -p 8081:8081 -p 8082:8082 -p 554:554 m7s:3.0
```
# Documentation
中文文档:
[http://docs.monibuca.com](http://docs.monibuca.com).

View File

@@ -47,6 +47,14 @@ bash <(curl -s -S -L https://monibuca.com/demo.sh)
功能强大的仪表盘可以直观的看到服务器运行的状态、消耗的资源、以及其他统计信息。用户可以利用控制台对服务器进行配置和控制。
# 在 Docker 中编译和测试
> 生产服务需要暴露IP和大量端口建议容器仅用于开发和测试
```shell
docker build . -f dockerfile -t m7s:3.0
docker run --name m7s -p 1935:1935 -p 8081:8081 -p 8082:8082 -p 554:554 m7s:3.0
```
# 交流微信群
进入网站首页上进行扫码

46
dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM golang:1.17.0-alpine3.14 as builder
LABEL maintainer="yangshuhai@pdnews.cn"
WORKDIR /app
# 先装好基础依赖,减少在代码变化时的重复构建时间
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.14/main" > /etc/apk/repositories
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.14/community" >> /etc/apk/repositories
RUN apk add --no-cache --update autoconf automake make gcc g++
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go get -d github.com/Monibuca/engine/v3@v3.4.7
RUN go get -d github.com/Monibuca/plugin-gateway/v3@v3.0.10
RUN go get -d github.com/Monibuca/plugin-gb28181/v3@v3.0.2
RUN go get -d github.com/Monibuca/plugin-hdl/v3@v3.0.5
RUN go get -d github.com/Monibuca/plugin-hls/v3@v3.0.6
RUN go get -d github.com/Monibuca/plugin-jessica/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-logrotate/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-record/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-rtmp/v3@v3.0.1
RUN go get -d github.com/Monibuca/plugin-rtsp/v3@v3.0.7
RUN go get -d github.com/Monibuca/plugin-summary@v1.0.0
RUN go get -d github.com/Monibuca/plugin-ts/v3@v3.0.1
RUN go get -d github.com/Monibuca/plugin-webrtc/v3@v3.0.3
# 再复制代码进行编译,可节省大量构建时间
COPY . .
RUN go mod tidy
RUN GOOS=linux go build -o m7s
# 构建完成则将成品复制到新的镜像中,减小镜像大小,可以考虑添加 upx 进一步减少空间
FROM alpine:3.14
WORKDIR /app
COPY --from=builder /app/m7s /app/m7s
COPY config.toml /app/config.toml
RUN /app/m7s --help
EXPOSE 554
EXPOSE 1935
EXPOSE 5060
EXPOSE 8081
EXPOSE 8082
CMD ["/app/m7s", "-c", "/app/config.toml"]

9
go.mod
View File

@@ -3,17 +3,16 @@ module github.com/langhuihui/monibuca/v3
go 1.16
require (
github.com/Monibuca/engine/v3 v3.4.7
// github.com/Monibuca/plugin-ffmpeg v0.0.2
github.com/Monibuca/plugin-gateway/v3 v3.0.10
github.com/Monibuca/plugin-gb28181/v3 v3.0.2
github.com/Monibuca/engine/v3 v3.5.1
github.com/Monibuca/plugin-gateway/v3 v3.0.11
github.com/Monibuca/plugin-gb28181/v3 v3.0.6
github.com/Monibuca/plugin-hdl/v3 v3.0.5
github.com/Monibuca/plugin-hls/v3 v3.0.6
github.com/Monibuca/plugin-jessica/v3 v3.0.0
github.com/Monibuca/plugin-logrotate/v3 v3.0.0
github.com/Monibuca/plugin-record/v3 v3.0.0
github.com/Monibuca/plugin-rtmp/v3 v3.0.1
github.com/Monibuca/plugin-rtsp/v3 v3.0.7
github.com/Monibuca/plugin-rtsp/v3 v3.0.8
github.com/Monibuca/plugin-summary v1.0.0
github.com/Monibuca/plugin-ts/v3 v3.0.1
github.com/Monibuca/plugin-webrtc/v3 v3.0.3

19
go.sum
View File

@@ -4,12 +4,13 @@ github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/Monibuca/engine/v3 v3.1.0/go.mod h1:yz6cssED2VlYu+g/LrxseBB9pcvsLM/o2QXa4gVY650=
github.com/Monibuca/engine/v3 v3.4.1/go.mod h1:rgAUey5ziRhlh6WugWyA5fYKyGOvcwhtTMDk4sukE7E=
github.com/Monibuca/engine/v3 v3.4.5/go.mod h1:Dik9pFxU9TFI5vj8Sv5QXZM+ooCs2fm9P7Uhe4yYNkQ=
github.com/Monibuca/engine/v3 v3.4.7 h1:Umhn6Pxt04bNZ98A6W88PsSKK5hdmMnw9/gT1p9Mk18=
github.com/Monibuca/engine/v3 v3.4.7/go.mod h1:Dik9pFxU9TFI5vj8Sv5QXZM+ooCs2fm9P7Uhe4yYNkQ=
github.com/Monibuca/plugin-gateway/v3 v3.0.10 h1:lG3RoF6D7n1eqChiug1YzSof92Jn5mIQngNt50Acnso=
github.com/Monibuca/plugin-gateway/v3 v3.0.10/go.mod h1:Pw5seYubBswGoF4knryLbLp6qrkYPwg3a7ZupgOir/4=
github.com/Monibuca/plugin-gb28181/v3 v3.0.2 h1:kATCWXuCLHZZfSkRbkIRxbzaH5HU/HJzrHZtKDKENeE=
github.com/Monibuca/plugin-gb28181/v3 v3.0.2/go.mod h1:CkJw4xFfaAhL22NIsGO2bcKEf7SHWxwK6VJdk7M1X60=
github.com/Monibuca/engine/v3 v3.5.0/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/engine/v3 v3.5.1 h1:3AX+FwxerMw3JuyGXIOd/1dYCjA3IzWLKH/zq/GWe20=
github.com/Monibuca/engine/v3 v3.5.1/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/plugin-gateway/v3 v3.0.11 h1:wkTqaukhzlN55gq3PAlGB+9azYLhxGTxknoCK8aWvt4=
github.com/Monibuca/plugin-gateway/v3 v3.0.11/go.mod h1:Pw5seYubBswGoF4knryLbLp6qrkYPwg3a7ZupgOir/4=
github.com/Monibuca/plugin-gb28181/v3 v3.0.6 h1:AWvjjbs0xNOhm2u+/6DVFJY+6zbBjSrPuy5UD3X8RkQ=
github.com/Monibuca/plugin-gb28181/v3 v3.0.6/go.mod h1:EIu6vD1irPweLcA+1dC4k05wVe6ygYn6ErMfEx+UYPo=
github.com/Monibuca/plugin-hdl/v3 v3.0.5 h1:D7DO1a4wdNIQw5grcrSuIu2TMBTk7hTlNJjxEsMbvSE=
github.com/Monibuca/plugin-hdl/v3 v3.0.5/go.mod h1:ImBolaupuPvXGoWD5hOUUMvSPPuzrg2lzVWqhcXmdVA=
github.com/Monibuca/plugin-hls/v3 v3.0.6 h1:WfM9BeTnezQJK6WmC40A3yyxXXGFqJNMePvcjKtYa+M=
@@ -22,8 +23,8 @@ github.com/Monibuca/plugin-record/v3 v3.0.0 h1:449s+La2O5in0jaIdA94iK3QIS1s+G73V
github.com/Monibuca/plugin-record/v3 v3.0.0/go.mod h1:71pviyOflKsNq+ijPKOgcsKqZkvZ91PzJxLJWPDzYe0=
github.com/Monibuca/plugin-rtmp/v3 v3.0.1 h1:ZnklWGgblcD2a+siTgK84VLm6rJ445VzFuZia1Gea4k=
github.com/Monibuca/plugin-rtmp/v3 v3.0.1/go.mod h1:subd/7X5wcPbt5PDc0tbJ9RqNkvnrLJGj05RsYw25A8=
github.com/Monibuca/plugin-rtsp/v3 v3.0.7 h1:+FwpYGOgkHOaW12LGAlzwV2C0MkHFjay9pt2yIUvJBY=
github.com/Monibuca/plugin-rtsp/v3 v3.0.7/go.mod h1:byXGE5BxFv0RpcoOjcQRt7B7mZvrgNuVpRn0kJtFIkU=
github.com/Monibuca/plugin-rtsp/v3 v3.0.8 h1:wKGcTxwyZdG63AR5ZW9M5vYfUvMHY/iwmsq56XibEfQ=
github.com/Monibuca/plugin-rtsp/v3 v3.0.8/go.mod h1:byXGE5BxFv0RpcoOjcQRt7B7mZvrgNuVpRn0kJtFIkU=
github.com/Monibuca/plugin-summary v1.0.0 h1:tWL7KWw5mcep2jAhG3Gzd1DCiLSyCl3u3nmJtYkqGFA=
github.com/Monibuca/plugin-summary v1.0.0/go.mod h1:rpSCVcPrecGlgT+aoCYsA6MawsE6ELT2mMGYYlSfTWo=
github.com/Monibuca/plugin-ts/v3 v3.0.0/go.mod h1:S+sUqUbZTiRws/GHoxcVVQdhOcuUQUxoAGDeQOAgKw0=
@@ -40,6 +41,8 @@ github.com/agiledragon/gomonkey/v2 v2.2.0 h1:QJWqpdEhGV/JJy70sZ/LDnhbSlMrqHAWHcN
github.com/agiledragon/gomonkey/v2 v2.2.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/aler9/gortsplib v0.0.0-20211212220644-6f374e396529 h1:j2tfs+eUubyZnuwmYWzK+IS681IixfUyD8bivz4sqAw=
github.com/aler9/gortsplib v0.0.0-20211212220644-6f374e396529/go.mod h1:fyQrQyHo8QvdR/h357tkv1g36VesZlzEPsdAu2VrHHc=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
github.com/asticode/go-astikit v0.20.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
github.com/asticode/go-astits v1.10.0/go.mod h1:DkOWmBNQpnr9mv24KfZjq4JawCFX1FCqjLVGvO0DygQ=
github.com/cnotch/apirouter v0.0.0-20200731232942-89e243a791f3/go.mod h1:5deJPLON/x/s2dLOQfuKS0lenhOIT4xX0pvtN/OEIuY=