如何使用Docker部署briefing視頻聊天系統(tǒng)
一、briefing介紹
briefing簡介
briefing是一個開源的、安全的直接視頻群聊平臺。
二、本地環(huán)境介紹
2.1 本地環(huán)境規(guī)劃
本次實踐為個人測試環(huán)境,操作系統(tǒng)版本為centos7.6。
hostname | IP地址 | 操作系統(tǒng)版本 | Docker版本 |
---|---|---|---|
dokcer | 192.168.3.166 | centos 7.6 | 2 20.10.17 |
2.2 本次實踐介紹
1.本次實踐部署環(huán)境為個人測試環(huán)境,生產(chǎn)環(huán)境請謹慎;
2.在Docker環(huán)境下部署briefing視頻聊天系統(tǒng)。
三、本地環(huán)境檢查
3.1 檢查Docker服務狀態(tài)
檢查Docker服務是否正常運行,確保Docker正常運行。
[root@jeven ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2023-12-21 18:58:04 CST; 3 days ago Docs: https://docs.docker.com Main PID: 11425 (dockerd) Tasks: 47 Memory: 387.3M CGroup: /system.slice/docker.service ├─11425 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
3.2 檢查Docker版本
檢查Docker版本
[root@jeven ~]# docker -v Docker version 20.10.17, build 100c701
3.3 檢查docker compose 版本
檢查Docker compose版本,確保2.0以上版本。
[root@jeven ~]# docker compose version Docker Compose version v2.6.0
四、下載briefing鏡像
從docker hub拉取briefing鏡像
[root@jeven nullboard]# docker pull holtwick/briefing Using default tag: latest latest: Pulling from holtwick/briefing 661ff4d9561e: Pull complete 89059ca18a98: Pull complete 9bb776f8ddb0: Pull complete ef0b6390b7f1: Pull complete e4cdfee850fc: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:bd6afac29ce56fdcb689e03204dd00ebcfdd2690a55a817fdc00ef0799a4c99b Status: Downloaded newer image for holtwick/briefing:latest docker.io/holtwick/briefing:latest
五、部署briefing速查表
5.1 使用docker-cli創(chuàng)建briefing容器
使用docker-cli快速部署briefing容器
docker run -d \ \ --name briefing \ -v /datar/briefing/data:/app/data \ -p 6802:8080 \ --restart always \ holtwick/briefing
5.2 創(chuàng)建掛載目錄
創(chuàng)建掛載目錄
[root@jeven ~]# mkdir -p /data/briefing [root@jeven ~]# cd /data/briefing/
5.3 編輯docker-compose.yaml文件
本次實踐部署使用docker compose方式,編輯docker-compose.yaml文件。
version: '3' services: briefing: image: holtwick/briefing restart: always volumes: - /datar/briefing/data:/app/data ports: - 6802:8080 # networks: # default: # external: # name: proxy
5.4 運行briefing容器
使用docker-compose.yaml文件創(chuàng)建briefing容器
[root@jeven briefing]# docker compose up -d [+] Running 2/2 ? Network briefing_default Created 0.0s ? Container briefing-briefing-1 Started 1.2s
5.5 檢查briefing容器狀態(tài)
檢查briefing容器狀態(tài),確保briefing容器正常啟動。
[root@jeven briefing]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9c08e1730708 holtwick/briefing "docker-entrypoint.s…" 39 seconds ago Up 37 seconds 3478/tcp, 0.0.0.0:6802->8080/tcp, :::6802->8080/tcp briefing-briefing-1
5.6 檢查briefing容器日志
檢查briefing容器運行日志,確保briefing服務正常啟動。
[root@jeven briefing]# docker logs briefing-briefing-1 Zerva: Vite serving from /app/www Zerva: ********************************************************* Zerva: Open page at http://localhost:8080 Zerva: *********************************************************
六、配置反向代理
6.1 安裝nginx
由于是測試環(huán)境,本次反向代理直接部署在本地Docker宿主機同一臺服務器上,直接使用yum快速安裝nginx。
yum -y install nginx
啟動nginx服務
[root@jeven briefing]# systemctl enable --now nginx Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
檢查nginx服務狀態(tài)
[root@jeven briefing]# systemctl status nginx ● nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2023-12-26 16:40:11 CST; 24s ago Process: 81723 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS) Process: 81720 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS) Process: 81718 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS) Main PID: 81725 (nginx) Tasks: 3 Memory: 2.1M CGroup: /system.slice/nginx.service ├─81725 nginx: master process /usr/sbin/nginx ├─81726 nginx: worker process └─81727 nginx: worker process Dec 26 16:40:10 jeven systemd[1]: Starting The nginx HTTP and reverse proxy server... Dec 26 16:40:11 jeven nginx[81720]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok Dec 26 16:40:11 jeven nginx[81720]: nginx: configuration file /etc/nginx/nginx.conf test is successful Dec 26 16:40:11 jeven systemd[1]: Started The nginx HTTP and reverse proxy server.
6.2 創(chuàng)建證書相關文件
生成私鑰
openssl genrsa -out nginx.key 2048
生成證書
openssl req -new -key nginx.key -out nginx.csr
openssl x509 -req -in nginx.csr -signkey nginx.key -out nginx.pem
檢查證書相關文件
[root@jeven briefing]# ls docker-compose.yaml nginx.csr nginx.key nginx.pem
6.3 修改nginx配置文件
修改nginx配置文件/etc/nginx/nginx.conf
備份nginx.conf文件
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
修改nginx.conf文件,修改位置如圖中標注。
vim /etc/nginx/nginx.conf
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; # upstream web { # server 192.168.3.166; # } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; proxy_pass http://192.168.3.166:6802; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # server { listen 443 ssl; server_name localhost; ssl_certificate /data/briefing/nginx.pem; ssl_certificate_key /data/briefing/nginx.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; proxy_pass http://192.168.3.166:6802; } } }
6.4 重啟nginx服務
重啟nginx服務
systemctl restart nginx
七、訪問briefing首頁
訪問地址:https://192.168.3.166/,將IP替換為自己服務器IP地址,進入到briefing首頁。如果無法訪問,則檢查服務器防火墻是否設置,云服務器的安全組端口是否放行等。
將鏈接地址發(fā)送給視頻聊天的人員就可以了,這里由于是臺式機沒有攝像頭顯示。
到此這篇關于使用Docker部署briefing視頻聊天系統(tǒng)的文章就介紹到這了,更多相關Docker部署聊天系統(tǒng)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
云原生Docker創(chuàng)建并進入mysql容器的全過程
前面我們已經(jīng)安裝好了Docker,也簡單了解了Docker,下面這篇文章主要給大家介紹了關于云原生Docker創(chuàng)建并進入mysql容器的相關資料,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2023-02-02使用Docker安裝和配置 MySQL 數(shù)據(jù)庫的過程詳解
本文將介紹如何使用Docker來安裝和配置MySQL數(shù)據(jù)庫,以便在開發(fā)和測試環(huán)境中快速搭建MySQL實例,本文也是介紹兩種方式進行分別是“使用鏡像安裝”、“使用Docker Compose安裝”,感興趣的朋友一起看看吧2023-12-12Docker如何打包本地環(huán)境為tar包給別人使用
這篇文章主要介紹了Docker如何打包本地環(huán)境為tar包給別人使用問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-11-11Docker報錯Operation?not?permitted問題的解決方法
剛開始接觸Docker的朋友經(jīng)常會遇到問題,下面這篇文章主要給大家介紹了關于Docker報錯Operation?not?permitted問題的解決方法,需要的朋友可以參考下2023-02-02Docker容器化部署嘗試——多容器通信(node+mongoDB+nginx)
這篇文章主要介紹了Docker容器化部署嘗試——多容器通信(node+mongoDB+nginx),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-12-12