Skip to content

Commit

Permalink
Added combined live chat concept
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Oct 30, 2024
1 parent debe101 commit d48ceb7
Show file tree
Hide file tree
Showing 13 changed files with 473 additions and 127 deletions.
56 changes: 33 additions & 23 deletions docker-dev/tbot/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ events {
http {
include /etc/nginx/mime.types;
log_format apm '"$time_iso8601" client="$proxy_add_x_forwarded_for" '
'method=$request_method request="$request" '
'request_length=$request_length '
'status=$status bytes_sent=$bytes_sent '
'body_bytes_sent=$body_bytes_sent '
'referer=$http_referer '
'user_agent="$http_user_agent" '
'upstream_addr=$upstream_addr '
'upstream_status=$upstream_status '
'request_time=$request_time '
'upstream_response_time=$upstream_response_time '
'upstream_connect_time=$upstream_connect_time '
'upstream_header_time=$upstream_header_time';
'method=$request_method request="$request" '
'request_length=$request_length '
'status=$status bytes_sent=$bytes_sent '
'body_bytes_sent=$body_bytes_sent '
'referer=$http_referer '
'user_agent="$http_user_agent" '
'upstream_addr=$upstream_addr '
'upstream_status=$upstream_status '
'request_time=$request_time '
'upstream_response_time=$upstream_response_time '
'upstream_connect_time=$upstream_connect_time '
'upstream_header_time=$upstream_header_time';
access_log /var/log/nginx/access.log apm;
error_log /var/log/nginx/error.log;
sendfile on;
Expand All @@ -34,7 +34,7 @@ http {
proxy_read_timeout 30s;
tcp_nopush on;
proxy_headers_hash_max_size 512;

##
# Gzip Settings
##
Expand Down Expand Up @@ -66,19 +66,19 @@ http {
# Compression level (1-9)
# 5 is the perfect compromise between size and CPU usage
gzip_comp_level 5;

# gzip_buffers 16 8k;
# gzip_http_version 1.1;
gzip_types
text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;
text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;

proxy_next_upstream error;

Expand Down Expand Up @@ -117,5 +117,15 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
location /api/live-chat {
proxy_pass http://frontends;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
}
}
18 changes: 17 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"babel-loader": "^8.2.2",
"css-loader": "^6.2.0",
"html-loader": "^2.1.2",
"html-webpack-plugin": "^5.3.2",
"mini-css-extract-plugin": "^2.2.2",
"node-sass": "^7.0.1",
"prop-types": "^15.7.2",
"sass-loader": "^12.1.0",
"webpack": "^5.52.0",
"webpack-cli": "^4.8.0",
"html-webpack-plugin": "^5.3.2"
"webpack-cli": "^4.8.0"
},
"dependencies": {
"axios": "^0.21.3",
Expand All @@ -41,6 +41,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-config": "^5.1.1",
"react-router-dom": "^5.3.0"
"react-router-dom": "^5.3.0",
"react-use-websocket": "^3.0.0"
}
}
Loading

0 comments on commit d48ceb7

Please sign in to comment.