Browse Source

docker 文件 ,部分播放器样式

release_0.0.2
巴林闲侠 2 years ago
parent
commit
0debdb7c1d
  1. 2
      code/VideoAccess-VCMP/api/.vscode/launch.json
  2. 22
      code/VideoAccess-VCMP/api/Dockerfile
  3. 27
      code/VideoAccess-VCMP/api/app/lib/service/mqttVideoServer.js
  4. 19
      code/VideoAccess-VCMP/api/jenkinsfile
  5. 20
      code/VideoAccess-VCMP/web/Dockerfile
  6. 2
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx
  7. 5
      code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx
  8. 19
      code/VideoAccess-VCMP/web/jenkinsfile

2
code/VideoAccess-VCMP/api/.vscode/launch.json

@ -23,7 +23,7 @@
"--iotVideoServerUrl http://221.230.55.27:8081", "--iotVideoServerUrl http://221.230.55.27:8081",
"--godUrl https://restapi.amap.com/v3", "--godUrl https://restapi.amap.com/v3",
"--godKey 21c2d970e1646bb9a795900dd00093ce", "--godKey 21c2d970e1646bb9a795900dd00093ce",
"--mqttVideoServer mqtt://127.0.0.1" "--mqttVideoServer tcp://tee2b1be.cn.emqx.cloud:12847"
] ]
}, },
{ {

22
code/VideoAccess-VCMP/api/Dockerfile

@ -1,7 +1,4 @@
FROM repository.anxinyun.cn/devops/node:12-dev as builder
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
MAINTAINER liuxinyi "liu.xinyi@free-sun.com.cn"
COPY . /var/app COPY . /var/app
@ -9,6 +6,19 @@ WORKDIR /var/app
EXPOSE 8080 EXPOSE 8080
CMD ["-g", "postgres://FashionAdmin:123456@iota-m1:5433/SmartRiver", "--qnak", "5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu", "--qnsk", "w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5", "--qnbkt", "anxinyun-test", "--qndmn", "http://test.resources.anxinyun.cn"] RUN npm config set registry=http://10.8.30.22:7000
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json
RUN npm cache clean -f
RUN npm install --registry http://10.8.30.22:7000
RUN npm run build
RUN rm -rf client/src
RUN rm -rf node_modules
RUN npm install --production --registry http://10.8.30.22:7000
FROM repository.anxinyun.cn/devops/node:12-dev
WORKDIR /app
COPY --from=builder /var/app .
ENTRYPOINT [ "node", "server.js" ] CMD ["node", "server.js"]

27
code/VideoAccess-VCMP/api/app/lib/service/mqttVideoServer.js

@ -2,21 +2,22 @@
const mqtt = require('mqtt'); const mqtt = require('mqtt');
module.exports = async function factory (app, opts) { module.exports = async function factory (app, opts) {
// const client = mqtt.connect(opts.mqtt.mqttVideoServer); console.info(`mqtt connecting ${opts.mqtt.mqttVideoServer}`);
// client.on('connect', function () { const client = mqtt.connect(opts.mqtt.mqttVideoServer);
// console.info(`mqtt connect success ${opts.mqtt.mqttVideoServer}`);
// })
// client.on('error', function (e) {
// console.error(`mqtt connect failed ${opts.mqtt.mqttVideoServer}`);
// app.fs.logger.error('info', '[FS-AUTH-MQTT]', `mqtt connect failed ${opts.mqtt.mqttVideoServer}`);
// })
// client.subscribe('test', { qos: 2 });//订阅主题为test的消息 client.on('connect', function () {
console.info(`mqtt connect success ${opts.mqtt.mqttVideoServer}`);
client.subscribe('test', { qos: 2 });//订阅主题为test的消息
})
client.on('error', function (e) {
console.error(`mqtt connect failed ${opts.mqtt.mqttVideoServer}`);
app.fs.logger.error('info', '[FS-AUTH-MQTT]', `mqtt connect failed ${opts.mqtt.mqttVideoServer}`);
})
// client.on('message', function (top, message) { client.on('message', function (top, message) {
// console.log(message.toString()); console.log(message.toString());
// }); });
// app.mqttVideoServer = client app.mqttVideoServer = client
} }

19
code/VideoAccess-VCMP/api/jenkinsfile

@ -0,0 +1,19 @@
pipeline {
agent {
node{
label 'jnlp-slave'
}
}
stages {
stage('Testing vcmp ......') {
steps {
sh 'switch-auth.sh vcmp'
buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}"
buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}"
sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} .'
sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}'
}
}
}
}

20
code/VideoAccess-VCMP/web/Dockerfile

@ -1,5 +1,4 @@
FROM repository.anxinyun.cn/devops/node:12-dev as builder
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
COPY . /var/app COPY . /var/app
@ -7,6 +6,19 @@ WORKDIR /var/app
EXPOSE 8080 EXPOSE 8080
CMD ["-u", "http://localhost:8088"] RUN npm config set registry=http://10.8.30.22:7000
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json
RUN npm cache clean -f
RUN npm install --registry http://10.8.30.22:7000
RUN npm run build
RUN rm -rf client/src
RUN rm -rf node_modules
RUN npm install --production --registry http://10.8.30.22:7000
FROM repository.anxinyun.cn/devops/node:12-dev
WORKDIR /app
COPY --from=builder /var/app .
ENTRYPOINT [ "node", "server.js" ] CMD ["node", "server.js"]

2
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoOperation.jsx

@ -71,7 +71,7 @@ const VideoOperation = ({
operation.map(p => { operation.map(p => {
return <img return <img
src={`/assets/images/background/video-icon-${p.key}-${operationState[p.key].select ? 'select' : 'unselect'}.png`} src={`/assets/images/background/video-icon-${p.key}-${operationState[p.key].select ? 'select' : 'unselect'}.png`}
height={26} height={18}
style={{ marginRight: 24, cursor: 'pointer' }} style={{ marginRight: 24, cursor: 'pointer' }}
onClick={p.click} onClick={p.click}
/> />

5
code/VideoAccess-VCMP/web/client/src/components/videoPlayer/videoPlay.jsx

@ -7,7 +7,10 @@ import './videoPlay.less';
const VideoPlay = ({ height, width }) => { const VideoPlay = ({ height, width }) => {
const [jessibuca, setjessibuca] = useState(null) const [jessibuca, setjessibuca] = useState(null)
const [playUrl, setPlayUrl] = useState('http://flv.bdplay.nodemedia.cn/live/bbb.flv') const [playUrl, setPlayUrl] = useState(
// 'http://flv.bdplay.nodemedia.cn/live/bbb.flv'
'http://221.230.55.27:2020/hdl/34020000001110000077/34020000001310000001.flv'
)
const [isPlaying, setIsPlaying] = useState(false) const [isPlaying, setIsPlaying] = useState(false)
const [operationState, setoperationState] = useState() const [operationState, setoperationState] = useState()
const [voiceDisY, setVoiceDisY] = useState(0) const [voiceDisY, setVoiceDisY] = useState(0)

19
code/VideoAccess-VCMP/web/jenkinsfile

@ -0,0 +1,19 @@
pipeline {
agent {
node{
label 'jnlp-slave'
}
}
stages {
stage('Testing vcmp ......') {
steps {
sh 'switch-auth.sh vcmp'
buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}"
buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}"
sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} .'
sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}'
}
}
}
}
Loading…
Cancel
Save