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 .vscode
config/npm/keys.json config/npm/keys.json
config/npm/logs config/npm/logs
maps/

Binary file not shown.

View File

@ -1,23 +1,5 @@
# http://loki { # {
# root * /usr/share/caddy # debug
# 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
# } # }
http://loki { http://loki {
@ -25,19 +7,23 @@ http://loki {
file_server browse file_server browse
handle_path /config* { handle_path /config* {
#rewrite * / reverse_proxy http://olivetin:1337
reverse_proxy olivetin:1337
} }
handle_path /viz* { handle_path /viz* {
#rewrite * / reverse_proxy http://foxglove:8080
reverse_proxy foxglove:8080
} }
} }
# http://loki/config { http://loki.local {
# handle_path /config* { root * /usr/share/caddy
# rewrite * / file_server browse
# reverse_proxy olivetin:1337
# } 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"> <div id="NORM_SET">
<table> <table>
<tr> <tr>
<td>SSD:</td> <td>SSID:</td>
<td>CPS_bot_mini</td> <td>cps-loki</td>
</tr> </tr>
<tr> <tr>
<td>Password: </td> <td>Password: </td>
<td>pac999CPS</td> <td>cps-loki</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -37,11 +37,11 @@
<div class="box" id="RIGHT"> <div class="box" id="RIGHT">
<div id="BLOCK_ONE"> <div id="BLOCK_ONE">
<p class="mini-heads">Link to WebGui:</p> <p class="mini-heads">Link to Configuration:</p>
<!-- again --> <!-- again -->
<!-- Replace link at href --> <!-- Replace link at href -->
<!-- hier Link zu WebGui --> <!-- 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> <img src="qr_dummy_1.png" class="qr qr_2"></a>
<br> <br>
</div> </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."