Last active
March 3, 2023 19:47
-
-
Save pc-m/d375df30191e283343db10a721b6ad18 to your computer and use it in GitHub Desktop.
Scaling wazo-websocketd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| copy config2.yml to /etc/wazo-websocketd/config2.yml | |
| Create the file wazo-websocketd2.service at /etc/systemd/system | |
| systemctl daemon-reload | |
| systemctl start wazo-websocketd2 | |
| Add the websocketd upstream in /etc/nginx/sites-available/wazo | |
| ``` | |
| upstream websocketd { | |
| server 127.0.0.1:9502; | |
| server 127.0.0.1:9512; | |
| } | |
| ``` | |
| copy wazo-websocketd over /etc/nginx/locations/https-available/wazo-websocketd | |
| systemctl reload nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log_file: /var/log/wazo-websocketd2.log | |
| websocket: | |
| port: 9512 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location ^~ /api/websocketd/ { | |
| proxy_pass http://websocketd/; | |
| proxy_http_version 1.1; | |
| proxy_read_timeout 90s; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header X-Script-Name /api/websocketd; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=wazo-websocketd server | |
| ConditionPathExists=!/var/lib/wazo/disabled | |
| After=network.target rabbitmq-server.service wazo-auth.service | |
| StartLimitBurst=15 | |
| StartLimitIntervalSec=150 | |
| [Service] | |
| ExecStart=/usr/bin/python3 -u /usr/bin/wazo-websocketd -c /etc/wazo-websocketd/config2.yml | |
| Restart=on-failure | |
| RestartSec=5 | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment