diff --git a/config/caddy/Caddyfile b/config/caddy/Caddyfile new file mode 100644 index 0000000..827b802 --- /dev/null +++ b/config/caddy/Caddyfile @@ -0,0 +1,17 @@ +http://loki { + root * /usr/share/caddy + file_server browse +} + +http://browse.loki { + root * /usr/share/caddy + file_server browse +} + +http://config.loki { + reverse_proxy olivetin:1337 +} + +http://control.loki { + reverse_proxy foxglove:8080 +} diff --git a/config/caddy/content/overview/CPS_Logo_White_square_TRANSP.png b/config/caddy/content/overview/CPS_Logo_White_square_TRANSP.png new file mode 100644 index 0000000..8db20ad Binary files /dev/null and b/config/caddy/content/overview/CPS_Logo_White_square_TRANSP.png differ diff --git a/config/caddy/content/overview/index.html b/config/caddy/content/overview/index.html new file mode 100644 index 0000000..afeccfd --- /dev/null +++ b/config/caddy/content/overview/index.html @@ -0,0 +1,72 @@ + + + + + + + CPS Bot Overview + + + + + + +
+

CPS Bot Mini Overview

+
+ + +
+

Connect to Wi-Fi:

+ + +
+ + + + + + + + + +
SSD:CPS_bot_mini
Password: pac999CPS
+
+
+ + + +
+ + Check us out! +
+ + + + + + \ No newline at end of file diff --git a/config/caddy/content/overview/qr_dummy_1.png b/config/caddy/content/overview/qr_dummy_1.png new file mode 100644 index 0000000..4df57de Binary files /dev/null and b/config/caddy/content/overview/qr_dummy_1.png differ diff --git a/config/caddy/content/overview/qr_dummy_2.png b/config/caddy/content/overview/qr_dummy_2.png new file mode 100644 index 0000000..4df57de Binary files /dev/null and b/config/caddy/content/overview/qr_dummy_2.png differ diff --git a/config/caddy/content/overview/qr_wifi_actual.png b/config/caddy/content/overview/qr_wifi_actual.png new file mode 100644 index 0000000..4df57de Binary files /dev/null and b/config/caddy/content/overview/qr_wifi_actual.png differ diff --git a/config/caddy/content/overview/style.css b/config/caddy/content/overview/style.css new file mode 100644 index 0000000..986f579 --- /dev/null +++ b/config/caddy/content/overview/style.css @@ -0,0 +1,241 @@ +html +{ + background-color: rgb(51, 51, 51); + font-family: sans-serif; + padding-bottom: 50px; +} + +#HEADLINE +{ + font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + text-align: center; + color: white; + background-color: rgb(1, 115, 126); + box-shadow: 0px 15px 0px -5px rgb(1, 89, 97); + + margin-top: 2px; +} + +#LOGO +{ + height: 1em; + width: auto; + + float: right; + margin-top: 2px; + padding-left: 12px; + padding-right: 12px; + background-color: inherit; +} + +.mini-heads +{ + color: white; + font-weight: 700; +} + +#LEFT +{ + float: left; + max-width: 49.5%; + + text-align: center; +} + +#RIGHT +{ + float: right; + max-width: 49.5%; + flex-direction: row; + + text-align: center; +} + +.qr +{ + max-width: 59.5%; + height: auto; + + object-fit: cover; + + border-color: black; + border: 3px solid; + border-radius: 10%; + +} + +.qr_2 +{ + width: 35%; + height: auto; +} + +table, td +{ + color: white; + + width: 70%; + line-height: 190%; + border: 1px solid rgb(76, 76, 76); + background-color: rgb(34, 34, 34); + border-collapse: collapse; + margin-left: auto; + margin-right: auto; +} + +#SPACE +{ + padding: 3px; +} + +#NORM_SET +{ + padding-top: 6px; +} + +.link +{ + color: white; + background-color: rgb(1, 115, 126); + padding-left: 10px; + padding-right: 10px; + border-radius: 3px; + text-decoration: none; +} + +.link:hover +{ + color: rgb(206, 206, 206); +} + +.link:visited +{ + color: rgb(75, 75, 75); + background-color: rgb(1, 89, 97); +} + +.info +{ + color: white; + + background-color: rgb(34, 34, 34); + + padding-top: 3px; + padding-right: 6px; + text-indent: 6px; + + position: fixed; + bottom: 0px; + right: 6px; + + border: 1px solid rgb(76, 76, 76); +} + +.info:hover +{ + cursor: pointer; +} + +.info:visited +{ + color: rgb(206, 206, 206); +} + +a, a:visited, a:hover, a:active { + text-decoration: none; + color: inherit; +} + +/* Phone */ /* pract. ab 400% zoom (inludkiert) am pc */ +@media only screen and (max-width : 480px) +{ + #LEFT + { + width: 100%; + max-width: none; + clear: both; + text-align: center; + } + + #RIGHT + { + max-width: none; + padding-top: 10px; + } + + .qr + { + max-width: 43.9%; + } + + .qr_2 + { + width: 29%; + } +} + +/* Tablet / Ipad */ /* pract. ab 200% Zoom (nicht inkludiert) am pc */ +@media only screen and (max-width : 767px) and (min-width: 481px) +{ + #LEFT + { + max-width: none; + width: 100%; + clear: both; + text-align: center; + } + + .qr + { + max-width: 35%; + } + + table td + { + font-size: large; + } + + .mini-heads + { + font-size: x-large; + } + + #RIGHT + { + max-width: none; + } + + #SPACE + { + padding: none; + display: none; + } + + #BLOCK_ONE + { + max-width: 49.5%; + float: left; + } + + #BLOCK_TWO + { + max-width: 49.5%; + float: right; + } + + .qr_2 + { + max-width: 80%; + width: 50%; + } + + .link + { + font-size: larger; + } + + .info + { + font-size: larger; + } +} \ No newline at end of file diff --git a/config/npm/database.sqlite b/config/npm/database.sqlite index 1072660..77b2214 100644 Binary files a/config/npm/database.sqlite and b/config/npm/database.sqlite differ diff --git a/config/npm/nginx/default_host/site.conf b/config/npm/nginx/default_host/site.conf new file mode 100644 index 0000000..8e14528 --- /dev/null +++ b/config/npm/nginx/default_host/site.conf @@ -0,0 +1,18 @@ +# ------------------------------------------------------------ +# Default Site +# ------------------------------------------------------------ + +server { + listen 80 default; +listen [::]:80 default; + + server_name default-host.localhost; + access_log /data/logs/default-host_access.log combined; + error_log /data/logs/default-host_error.log warn; + + + include conf.d/include/letsencrypt-acme-challenge.conf; + location / { + return 301 http://192.168.20.10:1337/; + } +} diff --git a/config/npm/nginx/proxy_host/3.conf b/config/npm/nginx/proxy_host/3.conf new file mode 100644 index 0000000..0dbb4cc --- /dev/null +++ b/config/npm/nginx/proxy_host/3.conf @@ -0,0 +1,59 @@ +# ------------------------------------------------------------ +# overview.loki +# ------------------------------------------------------------ + + + +map $scheme $hsts_header { + https "max-age=63072000; preload"; +} + +server { + set $forward_scheme http; + set $server "host.docker.internal"; + set $port 1337; + + listen 80; +listen [::]:80; + + + server_name overview.loki; + + + + + + + + + + + + + access_log /data/logs/proxy-host-3_access.log proxy; + error_log /data/logs/proxy-host-3_error.log warn; + + + + + + + + location / { + + + + + + + + + # Proxy! + include conf.d/include/proxy.conf; + } + + + # Custom + include /data/nginx/custom/server_proxy[.]conf; +} + diff --git a/docker-compose.yaml b/docker-compose.yaml index 07f1e2e..6595f2b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -36,6 +36,7 @@ services: # Allows graphical programs in the container. - /tmp/.X11-unix:/tmp/.X11-unix:rw - ${XAUTHORITY:-$HOME/.Xauthority}:/root/.Xauthority + restart: unless-stopped # Overlay image containing the project specific source code. overlay: extends: base @@ -137,30 +138,6 @@ services: ################################################################################################################################### # Webgui Supervision via Foxglove Studio # ################################################################################################################################### - # config: - # container_name: olivetin - # image: ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin - # build: - # context: . - # dockerfile: docker/Dockerfile - # tags: - # - ghcr.io/bjoernellens1/cps_bot_mini_ws/olivetin - # target: olivetin - # x-bake: - # platforms: - # #- linux/arm64 - # - linux/amd64 - # #user: root - # privileged: true - # volumes: - # - ./config/olivetin.yaml:/config/config.yaml # replace host path or volume as needed - # # - .:/repo - # - /var/run/docker.sock:/var/run/docker.sock - # # - /var/lib/docker:/var/lib/docker - # ports: - # - "80:1337" - # restart: unless-stopped - olivetin: container_name: olivetin image: jamesread/olivetin @@ -186,7 +163,7 @@ services: # - /var/lib/docker:/var/lib/docker - ~/.ssh/id_rsa:/root/.ssh/id_rsa ports: - - "80:1337" + - "1337:1337" restart: unless-stopped portainer: @@ -268,22 +245,35 @@ services: # Core Services for Web Management # ################################################################################################################################ - npm: # nginx proxy manager for reverse proxying the webservices - #user "bjoern.ellensohn@unileoben.ac.at" - #password "cpsloki_npm" - image: 'jc21/nginx-proxy-manager:latest' - restart: always #unless-stopped - ports: - - '80:80' - - '81:81' - - '443:443' - volumes: - - ./config/npm:/data - - ./letsencrypt:/etc/letsencrypt + # npm: # nginx proxy manager for reverse proxying the webservices + # #user "bjoern.ellensohn@unileoben.ac.at" + # #password "cpsloki_npm" + # image: 'jc21/nginx-proxy-manager:latest' + # restart: unless-stopped + # ports: + # - '80:80' + # - '81:81' + # - '443:443' + # extra_hosts: + # - "host.docker.internal:host-gateway" + # #network_mode: host + # volumes: + # - ./config/npm:/data + # - ./config/npm/letsencrypt:/etc/letsencrypt + # depends_on: + # - foxglove + # - olivetin - management: + caddy: + image: caddy:latest + ports: + - "80:80" + - "443:443" + volumes: + - ./config/caddy/Caddyfile:/etc/caddy/Caddyfile + - ./config/caddy/content:/usr/share/caddy/ + restart: always depends_on: - - npm - foxglove - olivetin diff --git a/docker/Dockerfile b/docker/Dockerfile index 721cbc9..ababe64 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -43,6 +43,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-xacro \ && rm -rf /var/lib/apt/lists/* +# Install Foxglove Bridge +RUN apt-get update && apt-get install -y --no-install-recommends \ + ros-${ROS_DISTRO}-foxglove-bridge \ + && rm -rf /var/lib/apt/lists/* + ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ###########################################