update: caddy now working

This commit is contained in:
Björn Ellensohn 2024-03-25 09:59:52 +01:00
parent 1337b94615
commit 6569eb5889
6 changed files with 47 additions and 36 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
.vscode
config/npm/keys.json
config/npm/logs
maps/

Binary file not shown.

View File

@ -1,23 +1,5 @@
# http://loki {
# root * /usr/share/caddy
# file_server browse
# }
# http://loki/config {
# reverse_proxy /config/* foxglove:8080
# }
# http://browse.loki {
# root * /usr/share/caddy
# file_server browse
# }
# http://config.loki {
# reverse_proxy localhost:1337
# }
# http://control.loki {
# reverse_proxy foxglove:8080
# {
# debug
# }
http://loki {
@ -25,19 +7,23 @@ http://loki {
file_server browse
handle_path /config* {
#rewrite * /
reverse_proxy olivetin:1337
reverse_proxy http://olivetin:1337
}
handle_path /viz* {
#rewrite * /
reverse_proxy foxglove:8080
reverse_proxy http://foxglove:8080
}
}
# http://loki/config {
# handle_path /config* {
# rewrite * /
# reverse_proxy olivetin:1337
# }
# }
http://loki.local {
root * /usr/share/caddy
file_server browse
handle_path /config {
reverse_proxy http://olivetin:1337
}
handle_path /viz* {
reverse_proxy http://foxglove:8080
}
}

View File

@ -24,12 +24,12 @@
<div id="NORM_SET">
<table>
<tr>
<td>SSD:</td>
<td>CPS_bot_mini</td>
<td>SSID:</td>
<td>cps-loki</td>
</tr>
<tr>
<td>Password: </td>
<td>pac999CPS</td>
<td>cps-loki</td>
</tr>
</table>
</div>
@ -37,11 +37,11 @@
<div class="box" id="RIGHT">
<div id="BLOCK_ONE">
<p class="mini-heads">Link to WebGui:</p>
<p class="mini-heads">Link to Configuration:</p>
<!-- again -->
<!-- Replace link at href -->
<!-- hier Link zu WebGui -->
<a href="https://www.unileoben.ac.at/universitaet/lehrstuehle/institute/department-product-engineering/lehrstuhl-fuer-cyber-physical-systems/">
<a href="http://loki/config">
<img src="qr_dummy_1.png" class="qr qr_2"></a>
<br>
</div>

View File

@ -0,0 +1,7 @@
#!/bin/bash
# Change directory to where docker-compose.yml is located
cd /home/bjorn/git/cps_loki
# Restart the teleop service using docker-compose
docker compose restart teleop

16
scripts/setup.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# copy script to a system directory
sudo cp ps4_controller_script.sh /etc/udev/rules.d
# Set execute permissions for the script
sudo chmod +x /etc/udev/rules.d/ps4_controller_script.sh
# Create or append the udev rule
echo 'ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="Wireless Controller", RUN+="/etc/udev/rules.d/ps4_controller_script.sh"' | sudo tee -a /etc/udev/rules.d/99-ps4-controller.rules
# Reload udev rules
sudo udevadm control --reload-rules
# Provide user feedback
echo "Setup completed. PS4 controller udev rule installed."