SkeyeVSS国标视频平台软件开发指南

4 阅读2分钟

开发指南

1. 开发环境

  • 后端代码使用Go语言开发,需要配置go语言开发环境 go版本 >= 1.23.10 go.dev
  • 前端代码使用React(18.2.0) Typescript,需要配置node开发环境 nodejs.org
  • 手机端App使用Flutter开发,dart版本 >= 3.10.7,flutter版本 >= 3.38.7 docs.flutter.cn
  • SkeyeVSS国标视频平台源码地址 点击直达

2. 服务依赖

3. env配置

.env.local 为例

  • SKEYEVSS_INTERNAL_IP=内网ipSKEYEVSS_EXTERNAL_IP=公网ip,请不要填写127.0.0.1,如果为正确配置视频流可能不会正常播放。
  • SKEYEVSS_MYSQL_* mysql配置如果需要
  • SKEYEVSS_REDIS_* redis
  • SKEYEVSS_ETCD_* etcd

4. 服务启动

  • 启动etcd: etcd --data-dir /data/etcd --listen-client-urls http://internalIP:11003,http://127.0.0.1:11003 --advertise-client-urls http://internalIP:11003

  • 启动redis: redis-server --port 11002 --requirepass xxx --dir /data/redis --logfile /var/log/redis/redis-server.log --daemonize yes

  • 启动mysql(如果需要)

  • 启动media server: SkeyevssSevMediaServer -c skeyesms.conf

  • 接口服务

    • 启动参数 -f 配置文件路径 -env 环境变量,如果不指定参数将使用默认值 -f etc/.xx.yaml -env .env.local,详细请参考 core/app/sev/*/main.go
    • 执行go mod tidy && go mod vendor后依次执行
      • DB Grpc
        • 代码目录: core/app/sev/db
        • 启动: go run core/app/sev/db/main.go -f etc/.db-rpc.yaml -env .env.local
      • VSS
        • 代码目录: core/app/sev/vss
        • 启动: go run core/app/sev/vss/main.go -f etc/.vss.yaml -env .env.local
      • Cron
        • 代码目录: core/app/sev/cron
        • 启动: go run core/app/sev/cron/main.go -f etc/.cron.yaml -env .env.local
      • Backend Api
        • 代码目录: core/app/sev/backend
        • 启动: go run core/app/sev/backend/main.go -f etc/.backend-api.yaml -env .env.local
      • Web Proxy
        • 代码目录: core/app/sev/web
        • 启动: go run core/app/sev/web/main.go -f etc/.web-sev.yaml -env .env.local
  • 开源SkeyeVSS国标视频平台WEB前端(网页端) 项目地址 github.com/openskeye/s…

    • 启动 cd skeyevss_frontend_web && yarn && yarn start
    • 默认端口为 4000,通过env修改
  • 开源客户端App

    项目地址 github.com/openskeye/s…