Skip to content

Commit 467eae4

Browse files
cp-20pirosiki197
andauthored
feat(dashbaord): スリープ復帰時のローディング画面 (#997)
Co-authored-by: pirosiki <[email protected]> Co-authored-by: pirosiki197 <[email protected]>
1 parent cbeb1b2 commit 467eae4

File tree

5 files changed

+356
-80
lines changed

5 files changed

+356
-80
lines changed

.local-dev/config/ns.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ image:
2121
registry:
2222
scheme: http
2323
addr: registry.local
24-
username: ""
25-
password: ""
24+
username: ''
25+
password: ''
2626
namePrefix: ns-apps/
2727
tmpNamePrefix: ns-apps-tmp/
2828

@@ -35,20 +35,20 @@ components:
3535
address: http://buildpack:1235
3636
listenPort: 1235
3737
remoteDir: /workspace
38-
platformAPI: "0.11"
38+
platformAPI: '0.11'
3939
controller:
4040
url: http://ns-controller:10000
4141
priority: 0
42-
stepTimeout: "1h"
42+
stepTimeout: '1h'
4343

4444
controller:
4545
port: 10000
46-
token: "my-super-secret-token"
46+
token: 'my-super-secret-token'
4747
mode: docker
4848
docker:
4949
confDir: /opt/traefik/conf
5050
domains:
51-
- domain: "*.local.trapti.tech"
51+
- domain: '*.local.trapti.tech'
5252
excludes: []
5353
auth:
5454
available: true
@@ -81,7 +81,7 @@ components:
8181
url: http://sablier:10000
8282
sessionDuration: 5m
8383
dynamic:
84-
theme: ghost
84+
theme: neoshowcase
8585
blocking:
8686
timeout: 1m
8787
tls:
@@ -102,7 +102,7 @@ components:
102102

103103
k8s:
104104
domains:
105-
- domain: "*.local.trapti.tech"
105+
- domain: '*.local.trapti.tech'
106106
excludes: []
107107
auth:
108108
available: true
@@ -145,7 +145,7 @@ components:
145145
url: http://sablier.sablier.svc.cluster.local
146146
sessionDuration: 5m
147147
dynamic:
148-
theme: ghost
148+
theme: neoshowcase
149149
blocking:
150150
timeout: 1m
151151
tls:
@@ -156,7 +156,7 @@ components:
156156
domains: []
157157

158158
namespace: ns-apps
159-
imagePullSecret: ""
159+
imagePullSecret: ''
160160
# extra labels
161161
labels:
162162
- key: app.kubernetes.io/instance
@@ -197,7 +197,7 @@ components:
197197
type: loki
198198
loki:
199199
endpoint: http://loki:3100
200-
queryTemplate: "{ns_trap_jp_app_id=\"{{ .App.ID }}\"}"
200+
queryTemplate: '{ns_trap_jp_app_id="{{ .App.ID }}"}'
201201
metrics:
202202
type: prometheus
203203
prometheus:
@@ -214,7 +214,7 @@ components:
214214
215215
giteaIntegration:
216216
url: https://git.trap.jp
217-
token: ""
217+
token: ''
218218
controller:
219219
url: http://ns-controller:10000
220220

.local-dev/config/sablier.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ sessions:
55
expiration-interval: 20s
66
logging:
77
level: trace
8+
strategy:
9+
dynamic:
10+
custom-themes-path: /etc/sablier/themes
11+
default-theme: neoshowcase
12+
default-refresh-frequency: 5s

.local-manifest/sablier/sablier-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ spec:
2929
- name: project
3030
subPath: .local-dev/config/sablier.yaml
3131
mountPath: /etc/sablier/sablier.yaml
32+
- name: project
33+
subPath: dashboard/sablier-theme
34+
mountPath: /etc/sablier/themes

compose.yaml

Lines changed: 70 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ services:
1212
- ./.local-dev/keys:/keys
1313
- ~/.ssh/known_hosts:/root/.ssh/known_hosts
1414
labels:
15-
- "traefik.enable=true"
16-
- "traefik.http.routers.ns-gateway.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/neoshowcase.protobuf.APIService`)"
15+
- 'traefik.enable=true'
16+
- 'traefik.http.routers.ns-gateway.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/neoshowcase.protobuf.APIService`)'
1717
# - "traefik.http.routers.ns-gateway.middlewares=ns_auth@file"
18-
- "traefik.http.routers.ns-gateway.middlewares=ns_auth_dev@file"
19-
- "traefik.http.routers.ns-gateway.service=ns-gateway"
20-
- "traefik.http.services.ns-gateway.loadbalancer.server.port=8080"
18+
- 'traefik.http.routers.ns-gateway.middlewares=ns_auth_dev@file'
19+
- 'traefik.http.routers.ns-gateway.service=ns-gateway'
20+
- 'traefik.http.services.ns-gateway.loadbalancer.server.port=8080'
2121
depends_on:
2222
mysql:
2323
condition: service_healthy
@@ -36,12 +36,12 @@ services:
3636
- ./dashboard:/work
3737
- /work/node_modules
3838
labels:
39-
- "traefik.enable=true"
40-
- "traefik.http.routers.ns_dashboard.rule=Host(`ns.local.trapti.tech`)"
39+
- 'traefik.enable=true'
40+
- 'traefik.http.routers.ns_dashboard.rule=Host(`ns.local.trapti.tech`)'
4141
# - "traefik.http.routers.ns_dashboard.middlewares=ns_auth@file"
42-
- "traefik.http.routers.ns_dashboard.middlewares=ns_auth_dev@file"
43-
- "traefik.http.routers.ns_dashboard.service=ns_dashboard"
44-
- "traefik.http.services.ns_dashboard.loadbalancer.server.port=80"
42+
- 'traefik.http.routers.ns_dashboard.middlewares=ns_auth_dev@file'
43+
- 'traefik.http.routers.ns_dashboard.service=ns_dashboard'
44+
- 'traefik.http.services.ns_dashboard.loadbalancer.server.port=80'
4545
networks:
4646
- default
4747

@@ -68,14 +68,14 @@ services:
6868
ns-migrate:
6969
condition: service_completed_successfully
7070
labels:
71-
- "traefik.enable=true"
72-
- "traefik.http.routers.ns_controller_webhook.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/api/webhook`)"
73-
- "traefik.http.routers.ns_controller_webhook.service=ns_controller_webhook"
74-
- "traefik.http.services.ns_controller_webhook.loadbalancer.server.port=8080"
75-
- "traefik.tcp.routers.ns_controller.entrypoints=ns-ssh"
76-
- "traefik.tcp.routers.ns_controller.rule=HostSNI(`*`)"
77-
- "traefik.tcp.routers.ns_controller.service=ns_controller"
78-
- "traefik.tcp.services.ns_controller.loadbalancer.server.port=2201"
71+
- 'traefik.enable=true'
72+
- 'traefik.http.routers.ns_controller_webhook.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/api/webhook`)'
73+
- 'traefik.http.routers.ns_controller_webhook.service=ns_controller_webhook'
74+
- 'traefik.http.services.ns_controller_webhook.loadbalancer.server.port=8080'
75+
- 'traefik.tcp.routers.ns_controller.entrypoints=ns-ssh'
76+
- 'traefik.tcp.routers.ns_controller.rule=HostSNI(`*`)'
77+
- 'traefik.tcp.routers.ns_controller.service=ns_controller'
78+
- 'traefik.tcp.services.ns_controller.loadbalancer.server.port=2201'
7979
networks:
8080
- default
8181

@@ -105,10 +105,10 @@ services:
105105
volumes:
106106
- ./.local-dev/config/ns-auth.yaml:/config.yaml
107107
labels:
108-
- "traefik.enable=true"
109-
- "traefik.http.routers.ns_auth.rule=Host(`auth.local.trapti.tech`)"
110-
- "traefik.http.routers.ns_auth.service=ns_auth"
111-
- "traefik.http.services.ns_auth.loadbalancer.server.port=4181"
108+
- 'traefik.enable=true'
109+
- 'traefik.http.routers.ns_auth.rule=Host(`auth.local.trapti.tech`)'
110+
- 'traefik.http.routers.ns_auth.service=ns_auth'
111+
- 'traefik.http.services.ns_auth.loadbalancer.server.port=4181'
112112
networks:
113113
- default
114114

@@ -120,7 +120,7 @@ services:
120120
restart: always
121121
environment:
122122
HEADER: X-Showcase-User
123-
USER: "toki"
123+
USER: 'toki'
124124
networks:
125125
- default
126126

@@ -152,7 +152,7 @@ services:
152152
context: .
153153
target: ns
154154
image: ghcr.io/traptitech/ns:main
155-
restart: "no"
155+
restart: 'no'
156156
entrypoint: cp /app/ns /ns-bin
157157
volumes:
158158
- binary:/ns-bin
@@ -188,14 +188,14 @@ services:
188188
deploy:
189189
resources:
190190
limits:
191-
cpus: "1"
191+
cpus: '1'
192192

193193
static-server:
194194
image: caddy:2-alpine
195195
restart: always
196196
environment:
197197
# Do not bind to all addresses in production!
198-
CADDY_ADMIN: ":2019"
198+
CADDY_ADMIN: ':2019'
199199
volumes:
200200
- ./.local-dev/staticsite/artifacts:/artifacts
201201
networks:
@@ -225,13 +225,13 @@ services:
225225
context: .
226226
target: ns-migrate
227227
image: ghcr.io/traptitech/ns-migrate:main
228-
restart: "no"
228+
restart: 'no'
229229
environment:
230-
DB_HOST: "mysql"
231-
DB_PORT: "3306"
232-
DB_USER: "root"
233-
DB_PASS: "password"
234-
DB_NAME: "neoshowcase"
230+
DB_HOST: 'mysql'
231+
DB_PORT: '3306'
232+
DB_USER: 'root'
233+
DB_PASS: 'password'
234+
DB_NAME: 'neoshowcase'
235235
depends_on:
236236
mysql:
237237
condition: service_healthy
@@ -242,36 +242,36 @@ services:
242242
image: registry:2
243243
restart: always
244244
environment:
245-
REGISTRY_STORAGE_DELETE_ENABLED: "true"
245+
REGISTRY_STORAGE_DELETE_ENABLED: 'true'
246246
REGISTRY_HTTP_ADDR: :80
247247
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
248248
GC_SCRIPT: /gc.sh
249249
labels:
250-
- "traefik.enable=true"
251-
- "traefik.http.routers.registry.rule=Host(`registry.local`)"
252-
- "traefik.http.services.registry.loadbalancer.server.port=80"
250+
- 'traefik.enable=true'
251+
- 'traefik.http.routers.registry.rule=Host(`registry.local`)'
252+
- 'traefik.http.services.registry.loadbalancer.server.port=80'
253253
volumes:
254254
- ./.local-dev/registry/entrypoint.sh:/entrypoint.sh
255255
- ./.local-dev/registry/gc.sh:/gc.sh
256256
- ./.local-dev/registry-data:/var/lib/registry
257257
networks:
258258
default:
259259
aliases:
260-
- "registry.local"
260+
- 'registry.local'
261261

262262
registry-frontend:
263263
image: joxit/docker-registry-ui:2
264264
restart: always
265265
environment:
266-
SINGLE_REGISTRY: "true"
266+
SINGLE_REGISTRY: 'true'
267267
REGISTRY_TITLE: registry.local
268268
NGINX_PROXY_PASS_URL: http://registry.local
269-
SHOW_CONTENT_DIGEST: "true"
270-
DELETE_IMAGES: "true"
269+
SHOW_CONTENT_DIGEST: 'true'
270+
DELETE_IMAGES: 'true'
271271
labels:
272-
- "traefik.enable=true"
273-
- "traefik.http.routers.registry_frontend.rule=Host(`registry-frontend.local.trapti.tech`)"
274-
- "traefik.http.services.registry_frontend.loadbalancer.server.port=80"
272+
- 'traefik.enable=true'
273+
- 'traefik.http.routers.registry_frontend.rule=Host(`registry-frontend.local.trapti.tech`)'
274+
- 'traefik.http.services.registry_frontend.loadbalancer.server.port=80'
275275
networks:
276276
- default
277277

@@ -290,7 +290,7 @@ services:
290290
volumes:
291291
- ./.local-dev/mysql:/var/lib/mysql
292292
ports:
293-
- "5004:3306"
293+
- '5004:3306'
294294
networks:
295295
- default
296296
- apps
@@ -304,7 +304,7 @@ services:
304304
volumes:
305305
- ./.local-dev/mongo:/data/db
306306
ports:
307-
- "5010:27017"
307+
- '5010:27017'
308308
networks:
309309
- default
310310
- apps
@@ -316,19 +316,19 @@ services:
316316
ADMINER_DEFAULT_SERVER: mysql
317317
ADMINER_DESIGN: nette
318318
labels:
319-
- "traefik.enable=true"
320-
- "traefik.http.routers.adminer.rule=Host(`adminer.local.trapti.tech`)"
321-
- "traefik.http.services.adminer.loadbalancer.server.port=8080"
319+
- 'traefik.enable=true'
320+
- 'traefik.http.routers.adminer.rule=Host(`adminer.local.trapti.tech`)'
321+
- 'traefik.http.services.adminer.loadbalancer.server.port=8080'
322322
networks:
323323
- default
324324

325325
grafana:
326326
image: grafana/grafana:11.1.3
327327
restart: always
328328
labels:
329-
- "traefik.enable=true"
330-
- "traefik.http.routers.grafana.rule=Host(`grafana.local.trapti.tech`)"
331-
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
329+
- 'traefik.enable=true'
330+
- 'traefik.http.routers.grafana.rule=Host(`grafana.local.trapti.tech`)'
331+
- 'traefik.http.services.grafana.loadbalancer.server.port=3000'
332332
volumes:
333333
- ./.local-dev/grafana:/var/lib/grafana
334334
- ./.local-dev/config/grafana.ini:/etc/grafana/grafana.ini:ro
@@ -337,13 +337,13 @@ services:
337337

338338
loki:
339339
image: grafana/loki:3.1.0
340-
command: "-config.file /etc/loki/loki.yaml"
340+
command: '-config.file /etc/loki/loki.yaml'
341341
restart: always
342342
labels:
343343
# for debug
344-
- "traefik.enable=true"
345-
- "traefik.http.routers.loki.rule=Host(`loki.local.trapti.tech`)"
346-
- "traefik.http.services.loki.loadbalancer.server.port=3100"
344+
- 'traefik.enable=true'
345+
- 'traefik.http.routers.loki.rule=Host(`loki.local.trapti.tech`)'
346+
- 'traefik.http.services.loki.loadbalancer.server.port=3100'
347347
volumes:
348348
- ./.local-dev/loki:/var/lib/loki
349349
- ./.local-dev/config/loki.yaml:/etc/loki/loki.yaml:ro
@@ -352,7 +352,7 @@ services:
352352

353353
promtail:
354354
image: grafana/promtail:3.1.0
355-
command: "-config.file /etc/promtail/promtail.yaml"
355+
command: '-config.file /etc/promtail/promtail.yaml'
356356
restart: always
357357
volumes:
358358
- ./.local-dev/config/promtail.yaml:/etc/promtail/promtail.yaml
@@ -396,6 +396,8 @@ services:
396396
- --provider.name=docker
397397
volumes:
398398
- /var/run/docker.sock:/var/run/docker.sock
399+
- ./.local-dev/config/sablier.yaml:/etc/sablier/sablier.yaml
400+
- ./dashboard/sablier-theme:/etc/sablier/themes
399401

400402
traefik:
401403
image: traefik:3.1
@@ -420,22 +422,22 @@ services:
420422
- --experimental.plugins.sablier.modulename=github.com/sablierapp/sablier
421423
- --experimental.plugins.sablier.version=v1.8.1
422424
ports:
423-
- "80:80"
424-
- "443:443"
425-
- "2201:2201"
426-
- "8080:8080"
427-
- "9100:9100"
425+
- '80:80'
426+
- '443:443'
427+
- '2201:2201'
428+
- '8080:8080'
429+
- '9100:9100'
428430
volumes:
429431
- /var/run/docker.sock:/var/run/docker.sock
430432
- ./.local-dev/traefik:/opt/neoshowcase/conf
431433
labels:
432-
- "traefik.enable=true"
433-
- "traefik.http.routers.traefik_dashboard.rule=Host(`traefik.local.trapti.tech`)"
434-
- "traefik.http.routers.traefik_dashboard.service=traefik_dashboard"
435-
- "traefik.http.services.traefik_dashboard.loadbalancer.server.port=8080"
436-
- "traefik.http.routers.traefik_metrics.rule=Host(`traefik.local.trapti.tech`) && PathPrefix(`/metrics`)"
437-
- "traefik.http.routers.traefik_metrics.service=traefik_metrics"
438-
- "traefik.http.services.traefik_metrics.loadbalancer.server.port=9100"
434+
- 'traefik.enable=true'
435+
- 'traefik.http.routers.traefik_dashboard.rule=Host(`traefik.local.trapti.tech`)'
436+
- 'traefik.http.routers.traefik_dashboard.service=traefik_dashboard'
437+
- 'traefik.http.services.traefik_dashboard.loadbalancer.server.port=8080'
438+
- 'traefik.http.routers.traefik_metrics.rule=Host(`traefik.local.trapti.tech`) && PathPrefix(`/metrics`)'
439+
- 'traefik.http.routers.traefik_metrics.service=traefik_metrics'
440+
- 'traefik.http.services.traefik_metrics.loadbalancer.server.port=9100'
439441
networks:
440442
- default
441443
- apps

0 commit comments

Comments
 (0)