Comments (1)
I have chosen other docker network to deploy it. I could show my method here:
As mentioned above, my frontend docker container can't connect websocket with the backend docker container but the http connection does well.
Instead, I used host network on the frontend and backend container. And then I used nginx to proxy the websocket and the frontend page. The nginx config is following:
# 非强制重定向https
server {
listen 443 ssl; #侦听443端口,用于SSL
server_name YOUR_SERVERNAME; # 自己的域名
ssl_certificate /etc/nginx/cert/XXX.pem;
ssl_certificate_key /etc/nginx/cert/XXX.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_pass http://127.0.0.1:3000;
}
location /ws/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_pass http://127.0.0.1:8000;
}
}
BUT I still think it is not elegant. I don't know why I could not access the bakend by websocket but I could access the backend by http when using the same host: http://backend:8000.
If someone could offer more info about deployment, I would pretty appreciate.
from realchar.
Related Issues (20)
- weird issue on front end
- My browser console has this error and there is no sound. How can I solve it
- Error opening PCM device. -- CODE: -2 -- MSG: No such file or directory
- WebRTC Integration for RealChar HOT 1
- Checkout this out if you are looking for an alternative😘 HOT 1
- I can't hear any voice from charactor
- Error when running python cli.py web-build
- render deployment failed
- python3.10 cli.py run-uvicorn error
- python cli.py run-uvicorn , error!!!
- add support for OpenAI / LocalAI TTS endpoint
- /uploadfile 401 Unauthorized (Invalid Authorization credentials) HOT 2
- Open source? HOT 1
- Knowledge does not support markdown
- Why
- twilio agent only says first sentence
- Voice Detection, good but voice output not
- twilio call not working
- high cpu utilization process (kdevtmpfsi) in docker container realchar_db
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realchar.