-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77835b2
commit 55450e0
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node | ||
sudo cp voice-ai-relay.service /etc/systemd/system/voice-ai-relay.service | ||
sudo systemctl start voice-ai-relay | ||
sudo systemctl enable voice-ai-relay | ||
systemctl status voice-ai-relay |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
journalctl -u voice-ai-relay |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
!#/bin/sh | ||
sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT | ||
sudo iptables -A INPUT -i eth0 -p tcp --dport 3000 -j ACCEPT | ||
sudo iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT | ||
sudo iptables -A INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT | ||
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 | ||
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443 | ||
sudo iptables --flush |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Voice AI Relay Server | ||
Documentation=https://github.com/harmony-one/x/ | ||
After=network.target | ||
|
||
[Service] | ||
Environment=PORT=80 HTTPS_PORT=443 | ||
Type=simple | ||
User=worker | ||
WorkingDirectory=/opt/git/x/voice/relay | ||
ExecStart=/usr/bin/node /opt/git/x/voice/relay/bin/run.js | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |