diff --git a/.local-dev/config/ns.yaml b/.local-dev/config/ns.yaml index f3ab1008..453898d2 100644 --- a/.local-dev/config/ns.yaml +++ b/.local-dev/config/ns.yaml @@ -21,8 +21,8 @@ image: registry: scheme: http addr: registry.local - username: "" - password: "" + username: '' + password: '' namePrefix: ns-apps/ tmpNamePrefix: ns-apps-tmp/ @@ -35,20 +35,20 @@ components: address: http://buildpack:1235 listenPort: 1235 remoteDir: /workspace - platformAPI: "0.11" + platformAPI: '0.11' controller: url: http://ns-controller:10000 priority: 0 - stepTimeout: "1h" + stepTimeout: '1h' controller: port: 10000 - token: "my-super-secret-token" + token: 'my-super-secret-token' mode: docker docker: confDir: /opt/traefik/conf domains: - - domain: "*.local.trapti.tech" + - domain: '*.local.trapti.tech' excludes: [] auth: available: true @@ -81,7 +81,7 @@ components: url: http://sablier:10000 sessionDuration: 5m dynamic: - theme: ghost + theme: neoshowcase blocking: timeout: 1m tls: @@ -102,7 +102,7 @@ components: k8s: domains: - - domain: "*.local.trapti.tech" + - domain: '*.local.trapti.tech' excludes: [] auth: available: true @@ -145,7 +145,7 @@ components: url: http://sablier.sablier.svc.cluster.local sessionDuration: 5m dynamic: - theme: ghost + theme: neoshowcase blocking: timeout: 1m tls: @@ -156,7 +156,7 @@ components: domains: [] namespace: ns-apps - imagePullSecret: "" + imagePullSecret: '' # extra labels labels: - key: app.kubernetes.io/instance @@ -197,7 +197,7 @@ components: type: loki loki: endpoint: http://loki:3100 - queryTemplate: "{ns_trap_jp_app_id=\"{{ .App.ID }}\"}" + queryTemplate: '{ns_trap_jp_app_id="{{ .App.ID }}"}' metrics: type: prometheus prometheus: @@ -214,7 +214,7 @@ components: giteaIntegration: url: https://git.trap.jp - token: "" + token: '' controller: url: http://ns-controller:10000 diff --git a/.local-dev/config/sablier.yaml b/.local-dev/config/sablier.yaml index 703f2f94..1bd0a82c 100644 --- a/.local-dev/config/sablier.yaml +++ b/.local-dev/config/sablier.yaml @@ -5,3 +5,8 @@ sessions: expiration-interval: 20s logging: level: trace +strategy: + dynamic: + custom-themes-path: /etc/sablier/themes + default-theme: neoshowcase + default-refresh-frequency: 5s diff --git a/.local-manifest/sablier/sablier-deployment.yaml b/.local-manifest/sablier/sablier-deployment.yaml index fe496df0..7a1095e9 100644 --- a/.local-manifest/sablier/sablier-deployment.yaml +++ b/.local-manifest/sablier/sablier-deployment.yaml @@ -29,3 +29,6 @@ spec: - name: project subPath: .local-dev/config/sablier.yaml mountPath: /etc/sablier/sablier.yaml + - name: project + subPath: dashboard/sablier-theme + mountPath: /etc/sablier/themes diff --git a/compose.yaml b/compose.yaml index 21d5eb20..b80fe203 100644 --- a/compose.yaml +++ b/compose.yaml @@ -12,12 +12,12 @@ services: - ./.local-dev/keys:/keys - ~/.ssh/known_hosts:/root/.ssh/known_hosts labels: - - "traefik.enable=true" - - "traefik.http.routers.ns-gateway.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/neoshowcase.protobuf.APIService`)" + - 'traefik.enable=true' + - 'traefik.http.routers.ns-gateway.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/neoshowcase.protobuf.APIService`)' # - "traefik.http.routers.ns-gateway.middlewares=ns_auth@file" - - "traefik.http.routers.ns-gateway.middlewares=ns_auth_dev@file" - - "traefik.http.routers.ns-gateway.service=ns-gateway" - - "traefik.http.services.ns-gateway.loadbalancer.server.port=8080" + - 'traefik.http.routers.ns-gateway.middlewares=ns_auth_dev@file' + - 'traefik.http.routers.ns-gateway.service=ns-gateway' + - 'traefik.http.services.ns-gateway.loadbalancer.server.port=8080' depends_on: mysql: condition: service_healthy @@ -36,12 +36,12 @@ services: - ./dashboard:/work - /work/node_modules labels: - - "traefik.enable=true" - - "traefik.http.routers.ns_dashboard.rule=Host(`ns.local.trapti.tech`)" + - 'traefik.enable=true' + - 'traefik.http.routers.ns_dashboard.rule=Host(`ns.local.trapti.tech`)' # - "traefik.http.routers.ns_dashboard.middlewares=ns_auth@file" - - "traefik.http.routers.ns_dashboard.middlewares=ns_auth_dev@file" - - "traefik.http.routers.ns_dashboard.service=ns_dashboard" - - "traefik.http.services.ns_dashboard.loadbalancer.server.port=80" + - 'traefik.http.routers.ns_dashboard.middlewares=ns_auth_dev@file' + - 'traefik.http.routers.ns_dashboard.service=ns_dashboard' + - 'traefik.http.services.ns_dashboard.loadbalancer.server.port=80' networks: - default @@ -68,14 +68,14 @@ services: ns-migrate: condition: service_completed_successfully labels: - - "traefik.enable=true" - - "traefik.http.routers.ns_controller_webhook.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/api/webhook`)" - - "traefik.http.routers.ns_controller_webhook.service=ns_controller_webhook" - - "traefik.http.services.ns_controller_webhook.loadbalancer.server.port=8080" - - "traefik.tcp.routers.ns_controller.entrypoints=ns-ssh" - - "traefik.tcp.routers.ns_controller.rule=HostSNI(`*`)" - - "traefik.tcp.routers.ns_controller.service=ns_controller" - - "traefik.tcp.services.ns_controller.loadbalancer.server.port=2201" + - 'traefik.enable=true' + - 'traefik.http.routers.ns_controller_webhook.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/api/webhook`)' + - 'traefik.http.routers.ns_controller_webhook.service=ns_controller_webhook' + - 'traefik.http.services.ns_controller_webhook.loadbalancer.server.port=8080' + - 'traefik.tcp.routers.ns_controller.entrypoints=ns-ssh' + - 'traefik.tcp.routers.ns_controller.rule=HostSNI(`*`)' + - 'traefik.tcp.routers.ns_controller.service=ns_controller' + - 'traefik.tcp.services.ns_controller.loadbalancer.server.port=2201' networks: - default @@ -105,10 +105,10 @@ services: volumes: - ./.local-dev/config/ns-auth.yaml:/config.yaml labels: - - "traefik.enable=true" - - "traefik.http.routers.ns_auth.rule=Host(`auth.local.trapti.tech`)" - - "traefik.http.routers.ns_auth.service=ns_auth" - - "traefik.http.services.ns_auth.loadbalancer.server.port=4181" + - 'traefik.enable=true' + - 'traefik.http.routers.ns_auth.rule=Host(`auth.local.trapti.tech`)' + - 'traefik.http.routers.ns_auth.service=ns_auth' + - 'traefik.http.services.ns_auth.loadbalancer.server.port=4181' networks: - default @@ -120,7 +120,7 @@ services: restart: always environment: HEADER: X-Showcase-User - USER: "toki" + USER: 'toki' networks: - default @@ -152,7 +152,7 @@ services: context: . target: ns image: ghcr.io/traptitech/ns:main - restart: "no" + restart: 'no' entrypoint: cp /app/ns /ns-bin volumes: - binary:/ns-bin @@ -188,14 +188,14 @@ services: deploy: resources: limits: - cpus: "1" + cpus: '1' static-server: image: caddy:2-alpine restart: always environment: # Do not bind to all addresses in production! - CADDY_ADMIN: ":2019" + CADDY_ADMIN: ':2019' volumes: - ./.local-dev/staticsite/artifacts:/artifacts networks: @@ -225,13 +225,13 @@ services: context: . target: ns-migrate image: ghcr.io/traptitech/ns-migrate:main - restart: "no" + restart: 'no' environment: - DB_HOST: "mysql" - DB_PORT: "3306" - DB_USER: "root" - DB_PASS: "password" - DB_NAME: "neoshowcase" + DB_HOST: 'mysql' + DB_PORT: '3306' + DB_USER: 'root' + DB_PASS: 'password' + DB_NAME: 'neoshowcase' depends_on: mysql: condition: service_healthy @@ -242,14 +242,14 @@ services: image: registry:2 restart: always environment: - REGISTRY_STORAGE_DELETE_ENABLED: "true" + REGISTRY_STORAGE_DELETE_ENABLED: 'true' REGISTRY_HTTP_ADDR: :80 REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry GC_SCRIPT: /gc.sh labels: - - "traefik.enable=true" - - "traefik.http.routers.registry.rule=Host(`registry.local`)" - - "traefik.http.services.registry.loadbalancer.server.port=80" + - 'traefik.enable=true' + - 'traefik.http.routers.registry.rule=Host(`registry.local`)' + - 'traefik.http.services.registry.loadbalancer.server.port=80' volumes: - ./.local-dev/registry/entrypoint.sh:/entrypoint.sh - ./.local-dev/registry/gc.sh:/gc.sh @@ -257,21 +257,21 @@ services: networks: default: aliases: - - "registry.local" + - 'registry.local' registry-frontend: image: joxit/docker-registry-ui:2 restart: always environment: - SINGLE_REGISTRY: "true" + SINGLE_REGISTRY: 'true' REGISTRY_TITLE: registry.local NGINX_PROXY_PASS_URL: http://registry.local - SHOW_CONTENT_DIGEST: "true" - DELETE_IMAGES: "true" + SHOW_CONTENT_DIGEST: 'true' + DELETE_IMAGES: 'true' labels: - - "traefik.enable=true" - - "traefik.http.routers.registry_frontend.rule=Host(`registry-frontend.local.trapti.tech`)" - - "traefik.http.services.registry_frontend.loadbalancer.server.port=80" + - 'traefik.enable=true' + - 'traefik.http.routers.registry_frontend.rule=Host(`registry-frontend.local.trapti.tech`)' + - 'traefik.http.services.registry_frontend.loadbalancer.server.port=80' networks: - default @@ -290,7 +290,7 @@ services: volumes: - ./.local-dev/mysql:/var/lib/mysql ports: - - "5004:3306" + - '5004:3306' networks: - default - apps @@ -304,7 +304,7 @@ services: volumes: - ./.local-dev/mongo:/data/db ports: - - "5010:27017" + - '5010:27017' networks: - default - apps @@ -316,9 +316,9 @@ services: ADMINER_DEFAULT_SERVER: mysql ADMINER_DESIGN: nette labels: - - "traefik.enable=true" - - "traefik.http.routers.adminer.rule=Host(`adminer.local.trapti.tech`)" - - "traefik.http.services.adminer.loadbalancer.server.port=8080" + - 'traefik.enable=true' + - 'traefik.http.routers.adminer.rule=Host(`adminer.local.trapti.tech`)' + - 'traefik.http.services.adminer.loadbalancer.server.port=8080' networks: - default @@ -326,9 +326,9 @@ services: image: grafana/grafana:11.1.3 restart: always labels: - - "traefik.enable=true" - - "traefik.http.routers.grafana.rule=Host(`grafana.local.trapti.tech`)" - - "traefik.http.services.grafana.loadbalancer.server.port=3000" + - 'traefik.enable=true' + - 'traefik.http.routers.grafana.rule=Host(`grafana.local.trapti.tech`)' + - 'traefik.http.services.grafana.loadbalancer.server.port=3000' volumes: - ./.local-dev/grafana:/var/lib/grafana - ./.local-dev/config/grafana.ini:/etc/grafana/grafana.ini:ro @@ -337,13 +337,13 @@ services: loki: image: grafana/loki:3.1.0 - command: "-config.file /etc/loki/loki.yaml" + command: '-config.file /etc/loki/loki.yaml' restart: always labels: # for debug - - "traefik.enable=true" - - "traefik.http.routers.loki.rule=Host(`loki.local.trapti.tech`)" - - "traefik.http.services.loki.loadbalancer.server.port=3100" + - 'traefik.enable=true' + - 'traefik.http.routers.loki.rule=Host(`loki.local.trapti.tech`)' + - 'traefik.http.services.loki.loadbalancer.server.port=3100' volumes: - ./.local-dev/loki:/var/lib/loki - ./.local-dev/config/loki.yaml:/etc/loki/loki.yaml:ro @@ -352,7 +352,7 @@ services: promtail: image: grafana/promtail:3.1.0 - command: "-config.file /etc/promtail/promtail.yaml" + command: '-config.file /etc/promtail/promtail.yaml' restart: always volumes: - ./.local-dev/config/promtail.yaml:/etc/promtail/promtail.yaml @@ -396,6 +396,8 @@ services: - --provider.name=docker volumes: - /var/run/docker.sock:/var/run/docker.sock + - ./.local-dev/config/sablier.yaml:/etc/sablier/sablier.yaml + - ./dashboard/sablier-theme:/etc/sablier/themes traefik: image: traefik:3.1 @@ -420,22 +422,22 @@ services: - --experimental.plugins.sablier.modulename=github.com/sablierapp/sablier - --experimental.plugins.sablier.version=v1.8.1 ports: - - "80:80" - - "443:443" - - "2201:2201" - - "8080:8080" - - "9100:9100" + - '80:80' + - '443:443' + - '2201:2201' + - '8080:8080' + - '9100:9100' volumes: - /var/run/docker.sock:/var/run/docker.sock - ./.local-dev/traefik:/opt/neoshowcase/conf labels: - - "traefik.enable=true" - - "traefik.http.routers.traefik_dashboard.rule=Host(`traefik.local.trapti.tech`)" - - "traefik.http.routers.traefik_dashboard.service=traefik_dashboard" - - "traefik.http.services.traefik_dashboard.loadbalancer.server.port=8080" - - "traefik.http.routers.traefik_metrics.rule=Host(`traefik.local.trapti.tech`) && PathPrefix(`/metrics`)" - - "traefik.http.routers.traefik_metrics.service=traefik_metrics" - - "traefik.http.services.traefik_metrics.loadbalancer.server.port=9100" + - 'traefik.enable=true' + - 'traefik.http.routers.traefik_dashboard.rule=Host(`traefik.local.trapti.tech`)' + - 'traefik.http.routers.traefik_dashboard.service=traefik_dashboard' + - 'traefik.http.services.traefik_dashboard.loadbalancer.server.port=8080' + - 'traefik.http.routers.traefik_metrics.rule=Host(`traefik.local.trapti.tech`) && PathPrefix(`/metrics`)' + - 'traefik.http.routers.traefik_metrics.service=traefik_metrics' + - 'traefik.http.services.traefik_metrics.loadbalancer.server.port=9100' networks: - default - apps diff --git a/dashboard/sablier-theme/neoshowcase.html b/dashboard/sablier-theme/neoshowcase.html new file mode 100644 index 00000000..401df289 --- /dev/null +++ b/dashboard/sablier-theme/neoshowcase.html @@ -0,0 +1,266 @@ + + +
+ + +