ProudMuBai / GoFilm

多播放源自动采集在线影视网站 golang vue
https://m.mubai.link
MIT License
1.01k stars 231 forks source link

博主您好,想了解下该项目在宝塔的安装教程和采集资源站 #15

Open LOX2018 opened 9 months ago

LOX2018 commented 9 months ago

非常感谢您提供的开源项目资源,您编写的教程很精彩,小白我看不太懂,先向您咨询下在宝塔面板的安装教程,以及您所采用的是那个资源站的数据呢,资源很纯净高清,期待能收到您的回复,谢谢。

mouse0524 commented 9 months ago

git clone https://github.com/ProudMuBai/GoFilm.git cd GoFilm/film docker compose build docker compose up -d 默认安装。4条命令就行了。主页默认端口80

mouse0524 commented 9 months ago

image 采集站点信息

fabudizhi2 commented 8 months ago

[root@VPS112 film]# docker compose build [+] Building 38.4s (8/8) FINISHED docker:default => [film internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 281B 0.0s => [film internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [film internal] load metadata for docker.io/library/golang:1.20 4.1s => [film 1/4] FROM docker.io/library/golang:1.20@sha256:685846c2eb68f6ae4d784d56125ea9894981b 0.0s => [film internal] load build context 0.0s => => transferring context: 3.30kB 0.0s => CACHED [film 2/4] WORKDIR /opt/server 0.0s => CACHED [film 3/4] ADD ./server /opt/server 0.0s => ERROR [film 4/4] RUN go build main.go 34.3s


[film 4/4] RUN go build main.go:
0.425 go: downloading github.com/redis/go-redis/v9 v9.0.2
0.425 go: downloading gorm.io/gorm v1.25.5
0.425 go: downloading gorm.io/driver/mysql v1.4.7
0.736 go: downloading github.com/gin-gonic/gin v1.9.0
0.772 go: downloading github.com/gocolly/colly/v2 v2.1.0 0.861 go: downloading github.com/robfig/cron/v3 v3.0.0 0.900 go: downloading github.com/golang-jwt/jwt/v5 v5.1.0 0.925 go: downloading github.com/go-sql-driver/mysql v1.7.0 0.925 go: downloading github.com/jinzhu/now v1.1.5 0.985 go: downloading github.com/jinzhu/inflection v1.0.0 1.001 go: downloading github.com/cespare/xxhash/v2 v2.2.0 1.015 go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f 1.101 go: downloading github.com/gin-contrib/sse v0.1.0 1.101 go: downloading github.com/mattn/go-isatty v0.0.17 1.101 go: downloading golang.org/x/net v0.8.0 1.166 go: downloading github.com/PuerkitoBio/goquery v1.5.1 1.175 go: downloading github.com/antchfx/htmlquery v1.2.3 1.214 go: downloading github.com/antchfx/xmlquery v1.2.4 1.240 go: downloading github.com/gobwas/glob v0.2.3 1.263 go: downloading github.com/kennygrant/sanitize v1.2.4 1.297 go: downloading github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca 1.297 go: downloading github.com/temoto/robotstxt v1.1.1 1.452 go: downloading google.golang.org/appengine v1.6.6 1.462 go: downloading github.com/go-playground/validator/v10 v10.12.0 1.463 go: downloading github.com/ugorji/go/codec v1.2.11 1.463 go: downloading github.com/pelletier/go-toml/v2 v2.0.7 1.569 go: downloading google.golang.org/protobuf v1.30.0 1.596 go: downloading gopkg.in/yaml.v3 v3.0.1 1.610 go: downloading golang.org/x/sys v0.6.0 1.614 go: downloading github.com/antchfx/xpath v1.1.8 1.670 go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e 1.700 go: downloading github.com/andybalholm/cascadia v1.2.0 1.738 go: downloading golang.org/x/text v0.8.0 2.870 go: downloading github.com/go-playground/universal-translator v0.18.1 2.870 go: downloading github.com/leodido/go-urn v1.2.2 2.870 go: downloading golang.org/x/crypto v0.7.0 2.871 go: downloading github.com/golang/protobuf v1.5.0 2.928 go: downloading github.com/go-playground/locales v0.14.1 31.13 # server/plugin/db 31.13 plugin/db/mysql.go:6:2: "gorm.io/gorm/logger" imported and not used

failed to solve: process "/bin/sh -c go build main.go" did not complete successfully: exit code: 1

大佬我构建运行的时候不知什么原因一只报这个错

ProudMuBai commented 8 months ago

[root@VPS112 film]# docker compose build

[+] Building 38.4s (8/8) FINISHED docker:default => [film internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 281B 0.0s => [film internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [film internal] load metadata for docker.io/library/golang:1.20 4.1s => [film 1/4] FROM docker.io/library/golang:1.20@sha256:685846c2eb68f6ae4d784d56125ea9894981b 0.0s => [film internal] load build context 0.0s => => transferring context: 3.30kB 0.0s => CACHED [film 2/4] WORKDIR /opt/server 0.0s => CACHED [film 3/4] ADD ./server /opt/server 0.0s => ERROR [film 4/4] RUN go build main.go 34.3s

[film 4/4] RUN go build main.go: 0.425 go: downloading github.com/redis/go-redis/v9 v9.0.2 0.425 go: downloading gorm.io/gorm v1.25.5 0.425 go: downloading gorm.io/driver/mysql v1.4.7 0.736 go: downloading github.com/gin-gonic/gin v1.9.0 0.772 go: downloading github.com/gocolly/colly/v2 v2.1.0 0.861 go: downloading github.com/robfig/cron/v3 v3.0.0 0.900 go: downloading github.com/golang-jwt/jwt/v5 v5.1.0 0.925 go: downloading github.com/go-sql-driver/mysql v1.7.0 0.925 go: downloading github.com/jinzhu/now v1.1.5 0.985 go: downloading github.com/jinzhu/inflection v1.0.0 1.001 go: downloading github.com/cespare/xxhash/v2 v2.2.0 1.015 go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f 1.101 go: downloading github.com/gin-contrib/sse v0.1.0 1.101 go: downloading github.com/mattn/go-isatty v0.0.17 1.101 go: downloading golang.org/x/net v0.8.0 1.166 go: downloading github.com/PuerkitoBio/goquery v1.5.1 1.175 go: downloading github.com/antchfx/htmlquery v1.2.3 1.214 go: downloading github.com/antchfx/xmlquery v1.2.4 1.240 go: downloading github.com/gobwas/glob v0.2.3 1.263 go: downloading github.com/kennygrant/sanitize v1.2.4 1.297 go: downloading github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca 1.297 go: downloading github.com/temoto/robotstxt v1.1.1 1.452 go: downloading google.golang.org/appengine v1.6.6 1.462 go: downloading github.com/go-playground/validator/v10 v10.12.0 1.463 go: downloading github.com/ugorji/go/codec v1.2.11 1.463 go: downloading github.com/pelletier/go-toml/v2 v2.0.7 1.569 go: downloading google.golang.org/protobuf v1.30.0 1.596 go: downloading gopkg.in/yaml.v3 v3.0.1 1.610 go: downloading golang.org/x/sys v0.6.0 1.614 go: downloading github.com/antchfx/xpath v1.1.8 1.670 go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e 1.700 go: downloading github.com/andybalholm/cascadia v1.2.0 1.738 go: downloading golang.org/x/text v0.8.0 2.870 go: downloading github.com/go-playground/universal-translator v0.18.1 2.870 go: downloading github.com/leodido/go-urn v1.2.2 2.870 go: downloading golang.org/x/crypto v0.7.0 2.871 go: downloading github.com/golang/protobuf v1.5.0 2.928 go: downloading github.com/go-playground/locales v0.14.1 31.13 # server/plugin/db 31.13 plugin/db/mysql.go:6:2: "gorm.io/gorm/logger" imported and not used

failed to solve: process "/bin/sh -c go build main.go" did not complete successfully: exit code: 1

大佬我构建运行的时候不知什么原因一只报这个错

这个是我的问题, 上传的时候关闭sql详情日志功能忘记把没有使用的依赖一起删了, 我重新上传了, 你拉取最新的, 或者你直接把 server/plugin/db下的mysql.go 中的 "gorm.io/gorm/logger" 删掉都行

ProudMuBai commented 8 months ago

不对, 你还是直接拉最新版的film目录内容吧 ,其他地方也有变动

fabudizhi2 commented 8 months ago

[root@VPS112 film]# docker compose up -d [+] Running 5/5 ✔ Network film_film-network Created 0.4s ✔ Container film_redis Started 0.0s ✔ Container film_mysql Started 0.0s ✔ Container film_api Started 0.0s ✔ Container film_nginx Created 0.0s Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/opt/film/data/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": mount /opt/film/data/nginx/nginx.conf:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

大佬构建好了但是报错好像是nginx映射不了 ,我宿主机运行了nginx 是冲突了吗

下面是docker版本信息 [root@VPS112 film]# docker version Client: Docker Engine - Community Version: 24.0.7 API version: 1.43 Go version: go1.20.10 Git commit: afdd53b Built: Thu Oct 26 09:09:18 2023 OS/Arch: linux/amd64 Context: default

Server: Docker Engine - Community Engine: Version: 24.0.7 API version: 1.43 (minimum version 1.12) Go version: go1.20.10 Git commit: 311b9ff Built: Thu Oct 26 09:08:20 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.26 GitCommit: 3dd1e886e55dd695541fdcd67420c2888645a495 runc: Version: 1.1.10 GitCommit: v1.1.10-0-g18a0cb0 docker-init: Version: 0.19.0 GitCommit: de40ad0

ProudMuBai commented 8 months ago

你这个应该是film文件放的服务器路径不太对或者是改配置了没统一, 这种细节问题还是私聊我主页TG或者留一个你的联系方式

fabudizhi2 commented 8 months ago

我再试试重新拉取一下,飞机发消息了

kid9547 commented 6 months ago

所以该怎么在宝塔上部署啊,我该学习哪些知识。完全不会,大佬能给个方向不,想自学都没有方向

ProudMuBai commented 6 months ago

@kid9547 宝塔上四个服务你要分开部署我感觉反而会麻烦一些,自学的话我建议还是学JAVA吧,比较工作好找,go的话国内使用率没那么高的,如果实在想在宝塔上安装可以私我tg我帮你梳理一下步骤和问题也行