tl-open-source / tl-rtc-file

WebRTC P2P online web media streaming tool (for files, video, screen, live streaming, text) with management and statistical monitoring capabilities.
https://im.iamtsm.cn/website/index.html
MIT License
2.49k stars 258 forks source link

服务访问异常 #9

Closed accat7080 closed 1 year ago

accat7080 commented 1 year ago

启动看着没问题,但是浏览器访问不了

做了些改动 [root@tool-10-0-0-13 tl-rtc-file]# cat Dockerfile FROM node:14

WORKDIR /home/tlrtcfile

ADD . ./

COPY sources.list /etc/apt/sources.list

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 && \ apt update && \ apt install -y libxtst-dev && \ npm conf set registry https://registry.npm.taobao.org/ && \ npm install -g pm2 && \ cd /home/tlrtcfile/svr/ && \ npm install && \ cd /home/tlrtcfile/svr/build/webpack/ && \ npm install

EXPOSE 9092 8444

CMD ["/bin/sh", "docker-entrypoint.sh"

[root@tool-10-0-0-13 tl-rtc-file]# cat docker-entrypoint.sh

!/bin/bash

cd /home/tlrtcfile/svr

pm2 start npm --name=tlsocket -- run ssocket pm2 start npm --name=tlapi -- run sapi

cd build/webpack

pm2 start npm --name=tlbuild -- run pro

pm2 logs --lines 1000

数据库连接已添加

image image

iamtsm commented 1 year ago

启动看着没问题,但是浏览器访问不了

做了些改动 [root@tool-10-0-0-13 tl-rtc-file]# cat Dockerfile FROM node:14

WORKDIR /home/tlrtcfile

ADD . ./

COPY sources.list /etc/apt/sources.list

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 && apt update && apt install -y libxtst-dev && npm conf set registry https://registry.npm.taobao.org/ && npm install -g pm2 && cd /home/tlrtcfile/svr/ && npm install && cd /home/tlrtcfile/svr/build/webpack/ && npm install

EXPOSE 9092 8444

CMD ["/bin/sh", "docker-entrypoint.sh"

[root@tool-10-0-0-13 tl-rtc-file]# cat docker-entrypoint.sh #!/bin/bash

cd /home/tlrtcfile/svr

pm2 start npm --name=tlsocket -- run ssocket pm2 start npm --name=tlapi -- run sapi

cd build/webpack

pm2 start npm --name=tlbuild -- run pro

pm2 logs --lines 1000

数据库连接已添加

image image

暂时把sapi, ssocket替换为 lapi, lsocket就好,后面我优化一下这个地方