From 24de11e1c2a5e2564e1b83b9aa9b237cea55f4e2 Mon Sep 17 00:00:00 2001 From: ritter_t Date: Wed, 17 Sep 2025 09:14:34 +0200 Subject: [PATCH 1/5] It-strategy-dashboard v2.0 --- conf.d/it-dashboard.conf | 28 +++++++++++++ docker-compose.yaml | 88 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 109 insertions(+), 7 deletions(-) create mode 100644 conf.d/it-dashboard.conf diff --git a/conf.d/it-dashboard.conf b/conf.d/it-dashboard.conf new file mode 100644 index 0000000..124d9c0 --- /dev/null +++ b/conf.d/it-dashboard.conf @@ -0,0 +1,28 @@ +server { + listen 80; + server_name it-strategy-dashboard.psi.ch; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name it-strategy-dashboard.psi.ch; + + ssl_certificate /etc/nginx/certs/it-strategy-dashboard.psi.ch.crt; + ssl_certificate_key /etc/nginx/private/it-strategy-dashboard.psi.ch.key; + + root /opt/webcontent/it-strategy-dashboard; + index index.html; + + location / { + try_files $uri /index.html; + } + + location /api/ { + proxy_pass http://it-strategy-dashboard-backend:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} diff --git a/docker-compose.yaml b/docker-compose.yaml index 0956cf7..840d2ad 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,10 +16,11 @@ services: - /etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro - /etc/nginx/conf.d:/etc/nginx/conf.d:ro - /opt/webcontent/sinqstatus-test:/opt/webcontent/sinqstatus-test:ro + - /opt/webcontent/it-strategy-dashboard/frontend/:/opt/webcontent/it-strategy-dashboard/:ro networks: - public - backend - + # linux-eng@psi.ch # Test app excalidraw: @@ -35,19 +36,19 @@ services: pif-elog: image: gitea.psi.ch/images/elog:3.1.5 container_name: pif-elog - restart: always + restart: always volumes: - /opt/logbooks/pif:/usr/local/elog/logbooks - /opt/webcontent/pif/elog.cfg:/usr/local/elog/elogd.cfg networks: - - backend + - backend # Krieger Jonas Andreas , Raselli Andrea-Raeto # Elog as a Service PoC mit musr-elog.psi.ch? linux-eng@psi.ch lmu-elog: image: gitea.psi.ch/images/elog:3.1.5 container_name: lmu-elog - restart: always + restart: always volumes: - /opt/logbooks/LMU:/usr/local/elog/logbooks - /opt/webcontent/LMU/elog.cfg:/usr/local/elog/elogd.cfg @@ -61,7 +62,7 @@ services: image: gitea.psi.ch/images/mcda-calculator:1.0.3 container_name: mcda-calculator restart: always - networks: + networks: - backend # Romain Sacchi @@ -99,7 +100,7 @@ services: - /opt/webcontent/sf-hedgedoc/uploads:/hedgedoc/public/uploads restart: always depends_on: - - hedgedoc_db + - hedgedoc_db networks: - backend - hedgedoc_backend @@ -123,7 +124,7 @@ services: gfa-status-test: image: php:8.2-apache container_name: gfa-status-test - volumes: + volumes: - /opt/webcontent/gfa-status/web:/var/www/html restart: always networks: @@ -187,8 +188,81 @@ services: networks: - backend + +# Ritter Tom +# It-Strategy monitoring dashboard + it-strategy-dashboard-frontend: + image: gitea.psi.ch/9501/it-strategy-dashboard-frontend:2.0 + container_name: it-strategy-dashboard-frontend + command: ["sh","-c","/usr/local/bin/copyData.sh"] + volumes: + - /opt/webcontent/it-strategy-dashboard/frontend:/opt/webcontent/it-strategy-dashboard/frontend + restart: "no" + + it-strategy-dashboard-backend: + image: gitea.psi.ch/9501/it-strategy-dashboard-backend:2.0 + container_name: it-strategy-dashboard-backend + restart: always + environment: + - DB_HOST=it-strategy-dashboard-db + - DB_PORT=3306 + - DB_NAME=itstrategy + - DB_USER=${IT_DASHBOARD_DB_USER} + - DB_PASS=${IT_DASHBOARD_DB_PW} + - JWT_SECRET=${JWT_SECRET} + depends_on: + it-strategy-dashboard-db: + condition: service_started + it-strategy-dashboard-liquibase: + condition: service_completed_successfully + networks: + - it_strategy_dashboard_backend + - backend + + it-strategy-dashboard-liquibase: + image: gitea.psi.ch/9501/it-strategy-dashboard-liquibase:2.0 + container_name: it-strategy-dashboard-liquibase + restart: "no" + environment: + - ADMIN_PW_HASH=${ADMIN_PW_HASH} + command: + - "--url=jdbc:mariadb://it-strategy-dashboard-db:3306/itstrategy" + - "--username=${IT_DASHBOARD_DB_USER}" + - "--password=${IT_DASHBOARD_DB_PW}" + - "--changelog-file=changelog/master.yaml" + - "update" + depends_on: + it-strategy-dashboard-db: + condition: service_healthy + networks: + - it_strategy_dashboard_backend + + + it-strategy-dashboard-db: + image: mariadb:12 + container_name: it-strategy-dashboard-db + restart: always + environment: + - MYSQL_ROOT_PASSWORD=${IT_DASHBOARD_DB_ROOT_PW} + - MYSQL_DATABASE=itstrategy + - MYSQL_USER=${IT_DASHBOARD_DB_USER} + - MYSQL_PASSWORD=${IT_DASHBOARD_DB_PW} + volumes: + - /opt/webcontent/it-strategy-dashboard/mysql/data:/var/lib/mysql + depends_on: + it-strategy-dashboard-frontend: + condition: service_completed_successfully + networks: + - it_strategy_dashboard_backend + healthcheck: + test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-u${IT_DASHBOARD_DB_USER}", "-p${IT_DASHBOARD_DB_PW}"] + interval: 10s + timeout: 5s + retries: 5 + networks: public: backend: hedgedoc_backend: woodpecker_backend: + it_strategy_dashboard_backend: From 397d56ef8848c9649844d56c861ad3173682615b Mon Sep 17 00:00:00 2001 From: ritter_t Date: Fri, 26 Sep 2025 16:19:45 +0200 Subject: [PATCH 2/5] docker-compose.yaml aktualisiert added directory with frontend data to nginx service --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index cb3b7d7..f894c18 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,6 +16,7 @@ services: - /etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro - /etc/nginx/conf.d:/etc/nginx/conf.d:ro - /opt/webcontent/sinqstatus-test:/opt/webcontent/sinqstatus-test:ro + - /opt/webcontent/it-strategy-dashboard/frontend/:/opt/webcontent/it-strategy-dashboard/:ro networks: - public - backend From 708b0f8152e2a2bd776538ea598c5b11d5a07d1d Mon Sep 17 00:00:00 2001 From: "tom.ritter" Date: Wed, 8 Oct 2025 13:18:23 +0200 Subject: [PATCH 3/5] It-strategy-dashboard v2.0.1 --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index f894c18..d9d1813 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -202,7 +202,7 @@ services: - it_strategy_dashboard_backend it-strategy-dashboard-backend: - image: gitea.psi.ch/9501/it-strategy-dashboard-backend:2.0 + image: gitea.psi.ch/9501/it-strategy-dashboard-backend:2.0.1 container_name: it-strategy-dashboard-backend restart: always environment: From 2a95f63f3bb92be1504c42137b970944612887d3 Mon Sep 17 00:00:00 2001 From: ritter_t Date: Wed, 8 Oct 2025 13:22:39 +0200 Subject: [PATCH 4/5] removed duplicated nginx conf file --- conf.d/it-dashboard.conf | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 conf.d/it-dashboard.conf diff --git a/conf.d/it-dashboard.conf b/conf.d/it-dashboard.conf deleted file mode 100644 index 124d9c0..0000000 --- a/conf.d/it-dashboard.conf +++ /dev/null @@ -1,28 +0,0 @@ -server { - listen 80; - server_name it-strategy-dashboard.psi.ch; - return 301 https://$host$request_uri; -} - -server { - listen 443 ssl; - server_name it-strategy-dashboard.psi.ch; - - ssl_certificate /etc/nginx/certs/it-strategy-dashboard.psi.ch.crt; - ssl_certificate_key /etc/nginx/private/it-strategy-dashboard.psi.ch.key; - - root /opt/webcontent/it-strategy-dashboard; - index index.html; - - location / { - try_files $uri /index.html; - } - - location /api/ { - proxy_pass http://it-strategy-dashboard-backend:8080; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } -} From 6d2b4b7087df344e51b499fa9ebc1f50910ea2c2 Mon Sep 17 00:00:00 2001 From: "tom.ritter" Date: Wed, 12 Nov 2025 14:23:30 +0100 Subject: [PATCH 5/5] chore(v3.0): updated frontend and backend container --- docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index d9d1813..07578cb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -192,7 +192,7 @@ services: # It-Strategy monitoring dashboard it-strategy-dashboard-frontend: - image: gitea.psi.ch/9501/it-strategy-dashboard-frontend:2.0 + image: gitea.psi.ch/9501/it-strategy-dashboard-frontend:3.0 container_name: it-strategy-dashboard-frontend command: ["sh","-c","/usr/local/bin/copyData.sh"] volumes: @@ -202,7 +202,7 @@ services: - it_strategy_dashboard_backend it-strategy-dashboard-backend: - image: gitea.psi.ch/9501/it-strategy-dashboard-backend:2.0.1 + image: gitea.psi.ch/9501/it-strategy-dashboard-backend:3.0 container_name: it-strategy-dashboard-backend restart: always environment: