Explorar o código

update docker-compose traefik labels

Harry de Boer %!s(int64=5) %!d(string=hai) anos
pai
achega
7d38139999
Modificáronse 2 ficheiros con 9 adicións e 3 borrados
  1. 3 1
      docker-compose.yml
  2. 6 2
      src/main/resources/static/dashboard/dashboard.js

+ 3 - 1
docker-compose.yml

@@ -7,4 +7,6 @@ puzzeltocht:
   labels:
     - "traefik.enable=true"
     - "traefik.port=8080"
-    - "traefik.frontend.rule=Host:puzzeltocht.ijscoboer.nl"
+    - "traefik.http.routers.puzzeltocht.rule=Host(`puzzeltocht.ijscoboer.nl`)"
+    - "traefik.http.routers.puzzeltocht.entrypoints=websecure"
+    - "traefik.http.routers.puzzeltocht.tls=true"

+ 6 - 2
src/main/resources/static/dashboard/dashboard.js

@@ -45,8 +45,12 @@ class Dashboard {
     showTeams(teams) {
         let teamlist = '';
         teams.forEach(t => {
-            teamlist += '<li>' + t.name + ' - ' + t.mission
-                + ' (' + t.location.latitude + ', ' + t.location.longitude + ') </li>';
+            teamlist += '<li>';
+            teamlist += t.name + ' - ' + t.mission;
+            if (t.location !== null) {
+                teamlist += ' (' + t.location.latitude + ', ' + t.location.longitude + ')';
+            }
+            teamlist += '</li>';
         });
         document.getElementById("teamlist").innerHTML = teamlist;
     }