forked from RoonLabs/roon-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1105 lines (980 loc) · 63.4 KB
/
index.html
File metadata and controls
1105 lines (980 loc) · 63.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RoonServer Docker Configuration Generator</title>
<meta name="description" content="Generate Docker Compose or docker run configurations for a Debian-based fork of the RoonServer Docker image.">
<style>
/* Compiled Tailwind CSS v3.4 — regenerate with: npx tailwindcss@3 -i input.css -o tailwind-output.css --minify */
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:SF Mono,Fira Code,JetBrains Mono,Consolas,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-50{z-index:50}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mt-0\.5{margin-top:.125rem}.mt-1\.5{margin-top:.375rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-16{height:4rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.min-h-screen{min-height:100vh}.w-14{width:3.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-surface-500\/30{border-color:rgba(55,65,81,.3)}.border-surface-500\/40{border-color:rgba(55,65,81,.4)}.border-surface-500\/50{border-color:rgba(55,65,81,.5)}.border-surface-600\/40{border-color:rgba(42,49,64,.4)}.bg-\[\#28c840\]{--tw-bg-opacity:1;background-color:rgb(40 200 64/var(--tw-bg-opacity,1))}.bg-\[\#febc2e\]{--tw-bg-opacity:1;background-color:rgb(254 188 46/var(--tw-bg-opacity,1))}.bg-\[\#ff5f57\]{--tw-bg-opacity:1;background-color:rgb(255 95 87/var(--tw-bg-opacity,1))}.bg-amber-500\/15{background-color:rgba(245,158,11,.15)}.bg-red-500\/15{background-color:rgba(239,68,68,.15)}.bg-roon-400\/15{background-color:rgba(107,110,217,.15)}.bg-roon-900\/30{background-color:rgba(30,31,72,.3)}.bg-surface-700{--tw-bg-opacity:1;background-color:rgb(32 38 47/var(--tw-bg-opacity,1))}.bg-surface-700\/60{background-color:rgba(32,38,47,.6)}.bg-surface-700\/80{background-color:rgba(32,38,47,.8)}.bg-surface-800{--tw-bg-opacity:1;background-color:rgb(26 32 43/var(--tw-bg-opacity,1))}.bg-surface-800\/60{background-color:rgba(26,32,43,.6)}.bg-surface-950{--tw-bg-opacity:1;background-color:rgb(13 19 29/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pt-4{padding-top:1rem}.font-mono{font-family:SF Mono,Fira Code,JetBrains Mono,Consolas,monospace}.font-sans{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif}.text-\[10px\]{font-size:10px}.text-\[13px\]{font-size:13px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.text-roon-300{--tw-text-opacity:1;color:rgb(146 148 227/var(--tw-text-opacity,1))}.text-roon-400{--tw-text-opacity:1;color:rgb(107 110 217/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-surface-300{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-surface-400{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-surface-500{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-black\/30{--tw-shadow-color:rgba(0,0,0,.3);--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-500\/20{--tw-ring-color:rgba(245,158,11,.2)}.ring-red-500\/20{--tw-ring-color:rgba(239,68,68,.2)}.ring-roon-400\/40{--tw-ring-color:rgba(107,110,217,.4)}.ring-surface-500\/30{--tw-ring-color:rgba(55,65,81,.3)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.hover\:border-roon-400\/50:hover{border-color:rgba(107,110,217,.5)}.hover\:bg-surface-600\/80:hover{background-color:rgba(42,49,64,.8)}.hover\:bg-surface-700\/50:hover{background-color:rgba(32,38,47,.5)}.hover\:text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\:text-roon-300:hover{--tw-text-opacity:1;color:rgb(146 148 227/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.focus\:border-roon-400:focus{--tw-border-opacity:1;border-color:rgb(107 110 217/var(--tw-border-opacity,1))}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-roon-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 110 217/var(--tw-ring-opacity,1))}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\:inline{display:inline}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:top-24{top:6rem}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:gap-8{gap:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}}
</style>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
/* Scrollbar */
.code-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.code-scroll::-webkit-scrollbar-track { background: transparent; }
.code-scroll::-webkit-scrollbar-thumb { background: #2e3344; border-radius: 3px; }
.code-scroll::-webkit-scrollbar-thumb:hover { background: #3b4155; }
/* Toggle switch */
.toggle-track {
width: 40px; height: 22px; border-radius: 11px;
background: #2e3344; position: relative; cursor: pointer;
transition: background 0.2s ease; flex-shrink: 0;
}
.toggle-track::after {
content: ''; position: absolute; top: 2px; left: 2px;
width: 18px; height: 18px; border-radius: 50%;
background: #64748b; transition: all 0.2s ease;
}
input:checked + .toggle-track { background: #6b6ed9; }
input:checked + .toggle-track::after {
transform: translateX(18px); background: #fff;
}
/* Syntax highlighting */
.hl-key { color: #79c0ff; }
.hl-string { color: #a5d6ff; }
.hl-comment { color: #6e7681; font-style: italic; }
.hl-punct { color: #8b949e; }
.hl-number { color: #d2a8ff; }
.hl-keyword { color: #ff7b72; }
.hl-flag { color: #79c0ff; }
.hl-cmd { color: #d2a8ff; }
/* Copy flash */
@keyframes copyFlash {
0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
100% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
.copy-flash { animation: copyFlash 0.5s ease-out; }
/* Editor dots */
.editor-dot { width: 12px; height: 12px; border-radius: 50%; }
/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
content: attr(data-tooltip);
position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
padding: 4px 8px; margin-bottom: 6px;
background: #1a202b; color: #e2e8f0; border: 1px solid #374151;
border-radius: 6px; font-size: 12px; white-space: nowrap;
opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
[data-tooltip]:hover::after { opacity: 1; }
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
}
/* Screen reader only */
.sr-only {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
</style>
</head>
<body class="bg-surface-950 min-h-screen font-sans" style="background:#0d131d;color:rgba(255,255,255,0.87)">
<!-- Header -->
<header class="border-b border-surface-600/40 bg-surface-700/80 backdrop-blur-sm sticky top-0 z-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<div class="flex items-center gap-3">
<div class="flex items-center gap-2">
<svg class="w-7 h-7 text-roon-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/>
</svg>
<span class="text-lg font-semibold text-white tracking-tight">RoonServer</span>
</div>
<span class="hidden sm:inline text-surface-300 text-sm">Docker Configuration Generator</span>
</div>
<a href="https://github.com/gtunes-dev/roon-docker"
class="flex items-center gap-2 text-sm text-surface-300 hover:text-white transition-colors duration-200 px-3 py-1.5 rounded-lg hover:bg-surface-700/50"
target="_blank" rel="noopener noreferrer">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>
<span class="hidden sm:inline">View on GitHub</span>
</a>
</div>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 lg:py-10">
<div class="grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-8">
<!-- Left Column: Options -->
<div class="lg:col-span-5 space-y-5">
<!-- Platform Selector -->
<section class="bg-surface-800/60 border border-surface-500/40 rounded-xl p-5 backdrop-blur-sm ring-1 ring-roon-400/40">
<div class="flex items-center gap-2 mb-3">
<h3 class="text-xs font-semibold uppercase tracking-wider text-slate-200">Platform</h3>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-amber-500/15 text-amber-400 ring-1 ring-amber-500/20">Select your platform</span>
</div>
<label for="platform-select" class="sr-only">Select your platform</label>
<select id="platform-select"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none appearance-none"
style="background-image:url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%236b7280%22%20d%3D%22M3%204.5l3%203%203-3%22%2F%3E%3C%2Fsvg%3E');background-repeat:no-repeat;background-position:right 12px center;padding-right:36px">
<option value="linux" hidden>Linux</option>
<option value="synology" selected>Synology</option>
<option value="qnap">QNAP</option>
<option value="unraid">Unraid</option>
<option value="truenas">TrueNAS SCALE</option>
<option value="custom">Custom</option>
</select>
<p class="text-xs text-surface-300 mt-3" id="platform-hint" aria-live="polite">Paths set for Synology DSM. Adjust volume1 if needed.</p>
</section>
<!-- Release Branch -->
<section class="bg-surface-800/60 border border-surface-500/40 rounded-xl p-5 backdrop-blur-sm">
<h3 class="text-xs font-semibold uppercase tracking-wider text-slate-200 mb-3">Roon Server Release Branch</h3>
<div>
<label class="block text-xs text-surface-300 mb-1.5" for="branch-select">Which release branch to install on first start</label>
<select id="branch-select"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none appearance-none"
style="background-image:url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%236b7280%22%20d%3D%22M3%204.5l3%203%203-3%22%2F%3E%3C%2Fsvg%3E');background-repeat:no-repeat;background-position:right 12px center;padding-right:36px">
<option value="production" selected>Production</option>
<option value="earlyaccess">Early Access</option>
</select>
<p class="text-xs text-surface-300 mt-1.5" id="branch-hint"></p>
</div>
</section>
<!-- Volumes -->
<section class="bg-surface-800/60 border border-surface-500/40 rounded-xl p-5 backdrop-blur-sm">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center gap-2">
<h3 class="text-xs font-semibold uppercase tracking-wider text-slate-200">Volumes</h3>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-red-500/15 text-red-400 ring-1 ring-red-500/20">Required</span>
</div>
<button type="button" id="btn-add-volume" data-tooltip="Add volume mount" aria-label="Add volume mount"
class="inline-flex items-center justify-center w-7 h-7 text-surface-300 hover:text-white bg-surface-700/60 hover:bg-surface-600/80 border border-surface-500/40 hover:border-roon-400/50 rounded-lg transition-all duration-200">
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg>
</button>
</div>
<div class="space-y-4">
<div>
<label class="text-sm font-medium text-white" for="vol-roon">/Roon</label>
<p class="text-xs text-surface-300 mt-0.5 mb-2" id="vol-roon-desc">Database, settings, cache, and machine identity. Must be writable and persistent.</p>
<input type="text" id="vol-roon" value="/volume1/docker/roon" aria-describedby="vol-roon-desc"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm font-mono text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none">
</div>
<div class="border-t border-surface-500/30 pt-4">
<label class="text-sm font-medium text-white" for="vol-music">/Music</label>
<p class="text-xs text-surface-300 mt-0.5 mb-2" id="vol-music-desc">Your primary music library. Mount additional libraries at <code class="text-roon-300">/Music/<name></code>.</p>
<input type="text" id="vol-music" value="/volume1/music" aria-describedby="vol-music-desc"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm font-mono text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none">
</div>
<div class="border-t border-surface-500/30 pt-4">
<label class="text-sm font-medium text-white" for="vol-backup">/RoonBackups</label>
<p class="text-xs text-surface-300 mt-0.5 mb-2" id="vol-backup-desc">Roon backup destination. Configure in Settings > Backups. Optional.</p>
<input type="text" id="vol-backup" value="/volume1/roon-backups" aria-describedby="vol-backup-desc"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm font-mono text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none">
</div>
<!-- Extra volume mounts -->
<div id="extra-volumes"></div>
</div>
</section>
<!-- Options -->
<section class="bg-surface-800/60 border border-surface-500/40 rounded-xl p-5 backdrop-blur-sm">
<h3 class="text-xs font-semibold uppercase tracking-wider text-slate-200 mb-4">Options</h3>
<div class="space-y-0">
<!-- Timezone -->
<div class="py-3 border-b border-surface-500/30">
<div class="flex items-start gap-3">
<label class="relative inline-flex items-center cursor-pointer mt-0.5 flex-shrink-0">
<input type="checkbox" id="opt-tz" class="sr-only peer" checked>
<div class="toggle-track"></div>
</label>
<div class="flex-1 min-w-0">
<div class="flex items-center gap-2 flex-wrap">
<label class="text-sm font-medium text-white cursor-pointer" for="opt-tz">Set timezone</label>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-amber-500/15 text-amber-400 ring-1 ring-amber-500/20">Recommended</span>
</div>
<p class="text-xs text-surface-300 mt-0.5">Correct timestamps for logs, last.fm scrobbles, and backup schedules.</p>
<div class="mt-2 overflow-hidden transition-all duration-200" id="tz-input-wrap" style="max-height:60px;opacity:1">
<label for="tz-value" class="sr-only">Timezone</label>
<select id="tz-value"
class="w-full px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none appearance-none"
style="background-image:url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%236b7280%22%20d%3D%22M3%204.5l3%203%203-3%22%2F%3E%3C%2Fsvg%3E');background-repeat:no-repeat;background-position:right 12px center;padding-right:36px">
<option value="UTC">UTC</option>
</select>
</div>
</div>
</div>
</div>
<!-- Logging -->
<div class="py-3 border-b border-surface-500/30">
<div class="flex items-start gap-3">
<label class="relative inline-flex items-center cursor-pointer mt-0.5 flex-shrink-0">
<input type="checkbox" id="opt-logging" class="sr-only peer" checked>
<div class="toggle-track"></div>
</label>
<div class="flex-1 min-w-0">
<div class="flex items-center gap-2 flex-wrap">
<label class="text-sm font-medium text-white cursor-pointer" for="opt-logging">Local logging driver</label>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider bg-amber-500/15 text-amber-400 ring-1 ring-amber-500/20">Recommended</span>
</div>
<p class="text-xs text-surface-300 mt-0.5">Prevents unbounded Docker log growth. Uses Docker's local log driver with automatic rotation.</p>
</div>
</div>
</div>
<!-- CIFS -->
<div class="py-3 border-b border-surface-500/30">
<div class="flex items-start gap-3">
<label class="relative inline-flex items-center cursor-pointer mt-0.5 flex-shrink-0">
<input type="checkbox" id="opt-cifs" class="sr-only peer">
<div class="toggle-track"></div>
</label>
<div class="flex-1 min-w-0">
<label class="text-sm font-medium text-white cursor-pointer" for="opt-cifs">SMB/CIFS mount support</label>
<p class="text-xs text-surface-300 mt-0.5">Add capabilities for mounting SMB network shares from inside the container. Most users should mount shares on the host instead.</p>
</div>
</div>
</div>
<!-- USB Audio -->
<div class="py-3 border-b border-surface-500/30">
<div class="flex items-start gap-3">
<label class="relative inline-flex items-center cursor-pointer mt-0.5 flex-shrink-0">
<input type="checkbox" id="opt-usb-audio" class="sr-only peer">
<div class="toggle-track"></div>
</label>
<div class="flex-1 min-w-0">
<label class="text-sm font-medium text-white cursor-pointer" for="opt-usb-audio">USB audio (DAC)</label>
<p class="text-xs text-surface-300 mt-0.5">Pass through USB and ALSA devices for local audio output to a USB DAC connected to the host. Not needed if streaming to network endpoints.</p>
</div>
</div>
</div>
<!-- HDMI Audio -->
<div class="py-3">
<div class="flex items-start gap-3">
<label class="relative inline-flex items-center cursor-pointer mt-0.5 flex-shrink-0">
<input type="checkbox" id="opt-hdmi-audio" class="sr-only peer">
<div class="toggle-track"></div>
</label>
<div class="flex-1 min-w-0">
<label class="text-sm font-medium text-white cursor-pointer" for="opt-hdmi-audio">HDMI audio</label>
<p class="text-xs text-surface-300 mt-0.5">Pass through GPU and ALSA devices for HDMI audio output. Requires GPU drivers on the host.</p>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- Right Column: Output -->
<div class="lg:col-span-7">
<div class="lg:sticky lg:top-24">
<!-- Output Mode Tabs + Actions -->
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 mb-3">
<div class="flex bg-surface-700/80 p-1 rounded-lg ring-1 ring-surface-500/30" role="tablist" aria-label="Output format">
<button id="tab-compose" role="tab" aria-selected="true" aria-controls="output"
class="tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 bg-roon-400/15 text-white ring-1 ring-roon-400/40">
docker-compose.yml
</button>
<button id="tab-run" role="tab" aria-selected="false" aria-controls="output"
class="tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 text-surface-300 hover:text-white">
docker run
</button>
</div>
<div class="flex gap-1.5">
<button id="btn-copy" data-tooltip="Copy to clipboard" aria-label="Copy to clipboard"
class="inline-flex items-center justify-center w-8 h-8 bg-surface-700/60 hover:bg-surface-600/80 border border-surface-500/40 hover:border-roon-400/50 rounded-lg text-surface-300 hover:text-white transition-all duration-200 active:scale-95">
<svg id="icon-copy" class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
<svg id="icon-check" class="w-4 h-4 hidden text-green-400" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24" aria-hidden="true">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</button>
<button id="btn-download" data-tooltip="Download as file" aria-label="Download file"
class="inline-flex items-center justify-center w-8 h-8 bg-surface-700/60 hover:bg-surface-600/80 border border-surface-500/40 hover:border-roon-400/50 rounded-lg text-surface-300 hover:text-white transition-all duration-200 active:scale-95">
<svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
</button>
</div>
</div>
<!-- Editor Window -->
<div class="rounded-xl overflow-hidden border border-surface-500/40 shadow-2xl shadow-black/30">
<!-- Title bar -->
<div class="flex items-center justify-between px-4 py-2.5 bg-surface-800 border-b border-surface-500/30">
<div class="flex items-center gap-2">
<div class="editor-dot bg-[#ff5f57]"></div>
<div class="editor-dot bg-[#febc2e]"></div>
<div class="editor-dot bg-[#28c840]"></div>
</div>
<span class="text-xs text-surface-300 font-mono" id="editor-filename">docker-compose.yml</span>
<div class="w-14"></div>
</div>
<!-- Code area -->
<div class="bg-surface-950 overflow-x-auto code-scroll" style="min-height:300px">
<div class="p-5 font-mono text-[13px] leading-relaxed" id="output" role="region" aria-label="Generated configuration" aria-live="polite" tabindex="0"></div>
</div>
</div>
<!-- Helpful note -->
<div class="mt-4 flex items-start gap-2.5 text-xs text-surface-300">
<svg class="w-4 h-4 text-surface-400 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="10"></circle>
<line x1="12" y1="16" x2="12" y2="12"></line>
<line x1="12" y1="8" x2="12.01" y2="8"></line>
</svg>
<p id="helpful-note"></p>
</div>
<div id="copy-status" class="sr-only" aria-live="assertive"></div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="border-t border-surface-500/30 mt-16">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div class="flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-surface-400">
<p>
<a href="https://github.com/gtunes-dev/roon-docker" class="text-roon-400 hover:text-roon-300 transition-colors">gtunes-dev/roon-docker</a>
<span class="mx-2 text-surface-500">·</span>
<span>RoonServer Docker Image (Debian fork)</span>
</p>
<p>Configuration generated client-side. Nothing is sent to any server.</p>
</div>
</div>
</footer>
<script>
(function() {
'use strict';
// --- State ---
var currentTab = 'compose';
// Platform presets for the volume inputs.
// roon — host path bound to container /Roon (app state)
// music — host path bound to container /Music (primary library)
// backup — host path bound to container /RoonBackups
// prefix — placeholder prefix for "add additional mount" host input
// hint — copy shown under the platform selector
var platforms = {
linux: {
roon: '/var/lib/roon',
music: '/mnt/music',
backup: '/var/backups/roon',
prefix: '/mnt/',
hint: 'Paths set to standard Linux conventions (FHS: /var/lib for service state, /var/backups for backups, /mnt for mounted media).',
},
synology: {
roon: '/volume1/docker/roon',
music: '/volume1/music',
backup: '/volume1/roon-backups',
prefix: '/volume1/',
hint: 'Paths set for Synology DSM. Adjust volume1 if needed.',
},
qnap: {
roon: '/share/Container/roon',
music: '/share/Music',
backup: '/share/Container/roon-backups',
prefix: '/share/',
hint: 'Paths set for QNAP. Container Station stores app data under /share/Container/.',
},
unraid: {
roon: '/mnt/user/appdata/roon',
music: '/mnt/user/Music',
backup: '/mnt/user/RoonBackups',
prefix: '/mnt/user/',
hint: 'Paths set for Unraid. Consider /mnt/cache/ for the Roon folder.',
},
truenas: {
roon: '/mnt/tank/apps/roon',
music: '/mnt/tank/media/music',
backup: '/mnt/tank/backups/roon',
prefix: '/mnt/tank/',
hint: 'Paths set for TrueNAS SCALE. Adjust pool name if needed.',
},
custom: {
roon: '/path/to/roon',
music: '/path/to/music',
backup: '/path/to/roon-backups',
prefix: '',
hint: 'Placeholder paths — replace with real host paths before running.',
},
};
// Per-platform validation patterns. Not every platform has a strict root, so
// linux/custom are absent and skip the check.
var platformRoots = {
synology: { pattern: /^\/volume\d+\//, label: 'Synology' },
qnap: { pattern: /^\/share\//, label: 'QNAP' },
unraid: { pattern: /^\/mnt\//, label: 'Unraid' },
truenas: { pattern: /^\/mnt\//, label: 'TrueNAS' },
};
function validatePrefix(platform, path) {
if (!path) return null;
var cfg = platformRoots[platform];
if (!cfg || cfg.pattern.test(path)) return null;
return cfg.label + ' paths typically start with ' + platforms[platform].prefix;
}
function currentPlatform() {
return document.getElementById('platform-select').value;
}
function updateExtraVolumeWarning(row) {
var hostInput = row.querySelector('.extra-vol-host');
var warning = row.querySelector('.extra-vol-warning');
if (!hostInput || !warning) return;
var msg = validatePrefix(currentPlatform(), hostInput.value.trim());
if (msg) {
warning.textContent = '⚠ ' + msg;
warning.classList.remove('hidden');
} else {
warning.classList.add('hidden');
}
}
function refreshExtraVolumeWarnings() {
document.querySelectorAll('.extra-vol-row').forEach(updateExtraVolumeWarning);
}
// --- DOM references ---
var elOutput = document.getElementById('output');
var elBtnCopy = document.getElementById('btn-copy');
var elIconCopy = document.getElementById('icon-copy');
var elIconCheck = document.getElementById('icon-check');
var elBtnDownload = document.getElementById('btn-download');
var elTabCompose = document.getElementById('tab-compose');
var elTabRun = document.getElementById('tab-run');
var elEditorFilename = document.getElementById('editor-filename');
var elPlatformHint = document.getElementById('platform-hint');
var elHelpfulNote = document.getElementById('helpful-note');
var elTzInputWrap = document.getElementById('tz-input-wrap');
var elCopyStatus = document.getElementById('copy-status');
// --- Helpers ---
function getVal(id) { return document.getElementById(id).value; }
function isChecked(id) { return document.getElementById(id).checked; }
function setVal(id, v) { document.getElementById(id).value = v; }
function readConfig() {
// Read extra volume mounts
var extras = [];
document.querySelectorAll('.extra-vol-row').forEach(function(row) {
var hostPath = row.querySelector('.extra-vol-host').value.trim();
var containerPath = row.querySelector('.extra-vol-container').value.trim();
if (hostPath && containerPath) {
extras.push({ host: hostPath, container: containerPath });
}
});
return {
image: 'ghcr.io/gtunes-dev/roonserver:latest',
branch: getVal('branch-select') || 'production',
volRoon: getVal('vol-roon') || '/Roon',
volMusic: getVal('vol-music') || '/music',
volBackup: getVal('vol-backup') || '/RoonBackups',
extraVolumes: extras,
tz: isChecked('opt-tz'),
tzValue: getVal('tz-value'),
logging: isChecked('opt-logging'),
cifs: isChecked('opt-cifs'),
usbAudio: isChecked('opt-usb-audio'),
hdmiAudio: isChecked('opt-hdmi-audio'),
};
}
// --- Generate Docker Compose YAML ---
function generateCompose(cfg) {
var lines = [];
lines.push('services:');
lines.push(' roonserver:');
lines.push(' image: ' + cfg.image);
lines.push(' container_name: roonserver');
lines.push(' network_mode: host');
var envVars = [];
if (cfg.branch === 'earlyaccess') envVars.push('ROON_INSTALL_BRANCH=earlyaccess');
if (cfg.tz) envVars.push('TZ=' + cfg.tzValue);
if (envVars.length) {
lines.push(' environment:');
envVars.forEach(function(v) { lines.push(' - ' + v); });
}
lines.push(' volumes:');
lines.push(' - ' + cfg.volRoon + ':/Roon');
lines.push(' - ' + cfg.volMusic + ':/Music');
lines.push(' - ' + cfg.volBackup + ':/RoonBackups');
cfg.extraVolumes.forEach(function(v) {
lines.push(' - ' + v.host + ':' + v.container);
});
if (cfg.usbAudio) {
lines.push(' - /run/udev:/run/udev:ro');
}
lines.push(' restart: unless-stopped');
if (cfg.cifs) {
lines.push(' cap_add:');
lines.push(' - SYS_ADMIN');
lines.push(' - DAC_READ_SEARCH');
}
if (cfg.usbAudio || cfg.hdmiAudio) {
lines.push(' devices:');
lines.push(' - /dev/snd:/dev/snd');
if (cfg.usbAudio) {
lines.push(' - /dev/bus/usb:/dev/bus/usb');
}
if (cfg.hdmiAudio) {
lines.push(' - /dev/dri:/dev/dri');
}
lines.push(' group_add:');
lines.push(' - audio');
}
if (cfg.logging) {
lines.push(' logging:');
lines.push(' driver: local');
}
return lines;
}
// --- Generate docker run command ---
function generateRun(cfg) {
var parts = [];
parts.push('docker run -d \\');
parts.push(' --name roonserver \\');
parts.push(' --network host \\');
if (cfg.branch === 'earlyaccess') {
parts.push(' -e ROON_INSTALL_BRANCH=earlyaccess \\');
}
if (cfg.tz) {
parts.push(' -e TZ=' + cfg.tzValue + ' \\');
}
parts.push(' -v ' + cfg.volRoon + ':/Roon \\');
parts.push(' -v ' + cfg.volMusic + ':/Music \\');
parts.push(' -v ' + cfg.volBackup + ':/RoonBackups \\');
cfg.extraVolumes.forEach(function(v) {
parts.push(' -v ' + v.host + ':' + v.container + ' \\');
});
if (cfg.logging) {
parts.push(' --log-driver local \\');
}
parts.push(' --restart unless-stopped \\');
if (cfg.cifs) {
parts.push(' --cap-add SYS_ADMIN \\');
parts.push(' --cap-add DAC_READ_SEARCH \\');
}
if (cfg.usbAudio || cfg.hdmiAudio) {
parts.push(' --device /dev/snd:/dev/snd \\');
}
if (cfg.usbAudio) {
parts.push(' --device /dev/bus/usb:/dev/bus/usb \\');
parts.push(' -v /run/udev:/run/udev:ro \\');
}
if (cfg.hdmiAudio) {
parts.push(' --device /dev/dri:/dev/dri \\');
}
if (cfg.usbAudio || cfg.hdmiAudio) {
parts.push(' --group-add audio \\');
}
parts.push(' ' + cfg.image);
return parts;
}
// --- Syntax highlighting: YAML (DOM-based, no innerHTML) ---
function highlightYaml(lines, container) {
container.textContent = '';
var table = document.createElement('table');
table.style.cssText = 'border-collapse:collapse;width:100%';
var tbody = document.createElement('tbody');
lines.forEach(function(line, i) {
var tr = document.createElement('tr');
var tdNum = document.createElement('td');
tdNum.style.cssText = 'color:#3b4155;user-select:none;text-align:right;padding-right:1.5em;vertical-align:top;white-space:nowrap;width:1%;';
tdNum.textContent = String(i + 1);
tr.appendChild(tdNum);
var tdCode = document.createElement('td');
tdCode.style.cssText = 'white-space:pre;';
var trimmed = line.trimStart();
var indent = line.length - trimmed.length;
var indentStr = line.substring(0, indent);
if (trimmed.startsWith('#')) {
var cs = document.createElement('span');
cs.className = 'hl-comment';
cs.textContent = line;
tdCode.appendChild(cs);
} else if (trimmed.startsWith('- ')) {
var valText = trimmed.substring(2);
tdCode.appendChild(document.createTextNode(indentStr));
var dash = document.createElement('span');
dash.className = 'hl-punct';
dash.textContent = '- ';
tdCode.appendChild(dash);
var val = document.createElement('span');
val.className = 'hl-string';
val.textContent = valText;
tdCode.appendChild(val);
} else if (trimmed.indexOf(':') > 0) {
var colonIdx = trimmed.indexOf(':');
var key = trimmed.substring(0, colonIdx);
var rest = trimmed.substring(colonIdx + 1);
tdCode.appendChild(document.createTextNode(indentStr));
var keySpan = document.createElement('span');
keySpan.className = 'hl-key';
keySpan.textContent = key;
tdCode.appendChild(keySpan);
var colonSpan = document.createElement('span');
colonSpan.className = 'hl-punct';
colonSpan.textContent = ':';
tdCode.appendChild(colonSpan);
if (rest.trim()) {
var valSpan = document.createElement('span');
if (/^\s*\d+[a-z]*\s*$/.test(rest)) {
valSpan.className = 'hl-number';
} else if (/^\s*(true|false|yes|no)\s*$/i.test(rest)) {
valSpan.className = 'hl-keyword';
} else {
valSpan.className = 'hl-string';
}
valSpan.textContent = ' ' + rest.trim();
tdCode.appendChild(valSpan);
}
} else {
tdCode.appendChild(document.createTextNode(line));
}
tr.appendChild(tdCode);
tbody.appendChild(tr);
});
table.appendChild(tbody);
container.appendChild(table);
}
// --- Syntax highlighting: shell (DOM-based, no innerHTML) ---
function highlightShell(lines, container) {
container.textContent = '';
var table = document.createElement('table');
table.style.cssText = 'border-collapse:collapse;width:100%';
var tbody = document.createElement('tbody');
// Output may contain multiple command blocks separated by blank lines
// (e.g., `docker volume create` + `docker run` + `docker run`). Each
// block's first line is a command; subsequent lines are flags until one
// that doesn't end with a backslash — that one is the block's terminal
// (image name or single-token arg). Blank lines reset the state machine.
var expectCommand = true;
lines.forEach(function(line, i) {
var tr = document.createElement('tr');
var tdNum = document.createElement('td');
tdNum.style.cssText = 'color:#3b4155;user-select:none;text-align:right;padding-right:1.5em;vertical-align:top;white-space:nowrap;width:1%;';
tdNum.textContent = String(i + 1);
tr.appendChild(tdNum);
var tdCode = document.createElement('td');
tdCode.style.cssText = 'white-space:pre;';
var trimmed = line.trim();
if (trimmed === '') {
tdCode.appendChild(document.createTextNode('\u00A0'));
expectCommand = true;
} else if (expectCommand) {
var cmdParts = trimmed.split(/\s+/);
var cmdSpan = document.createElement('span');
cmdSpan.className = 'hl-cmd';
cmdSpan.textContent = cmdParts[0];
tdCode.appendChild(cmdSpan);
for (var k = 1; k < cmdParts.length; k++) {
tdCode.appendChild(document.createTextNode(' '));
var fs = document.createElement('span');
if (cmdParts[k] === '\\') {
fs.className = 'hl-punct';
} else if (k === 1) {
fs.className = 'hl-key';
} else {
fs.className = 'hl-flag';
}
fs.textContent = cmdParts[k];
tdCode.appendChild(fs);
}
// If the command line has no trailing backslash, this is a one-line
// command; the next non-blank line is a fresh command.
expectCommand = !trimmed.endsWith('\\');
} else if (!trimmed.endsWith('\\')) {
// Terminal line of a multi-line command (e.g., the image name).
var indentImg = line.length - line.trimStart().length;
tdCode.appendChild(document.createTextNode(line.substring(0, indentImg)));
var imgSpan = document.createElement('span');
imgSpan.className = 'hl-string';
imgSpan.textContent = trimmed;
tdCode.appendChild(imgSpan);
expectCommand = true;
} else {
var indentFlag = line.length - line.trimStart().length;
tdCode.appendChild(document.createTextNode(line.substring(0, indentFlag)));
var withoutBackslash = trimmed.replace(/ \\$/, '');
var flagMatch = withoutBackslash.match(/^(--?[\w-]+)\s*(.*)/);
if (flagMatch) {
var fSpan = document.createElement('span');
fSpan.className = 'hl-flag';
fSpan.textContent = flagMatch[1];
tdCode.appendChild(fSpan);
if (flagMatch[2]) {
tdCode.appendChild(document.createTextNode(' '));
var vSpan = document.createElement('span');
vSpan.className = 'hl-string';
vSpan.textContent = flagMatch[2];
tdCode.appendChild(vSpan);
}
} else {
tdCode.appendChild(document.createTextNode(withoutBackslash));
}
tdCode.appendChild(document.createTextNode(' '));
var bs = document.createElement('span');
bs.className = 'hl-punct';
bs.textContent = '\\';
tdCode.appendChild(bs);
}
tr.appendChild(tdCode);
tbody.appendChild(tr);
});
table.appendChild(tbody);
container.appendChild(table);
}
// --- Update helpful note (DOM-based, no innerHTML) ---
function updateNote() {
elHelpfulNote.textContent = '';
if (currentTab === 'compose') {
elHelpfulNote.appendChild(document.createTextNode('Uses '));
var code = document.createElement('code');
code.className = 'text-roon-300 bg-roon-900/30 px-1 py-0.5 rounded font-mono';
code.textContent = 'network_mode: host';
elHelpfulNote.appendChild(code);
elHelpfulNote.appendChild(document.createTextNode(" for Roon's device discovery (SSDP/mDNS). No port mapping needed."));
} else {
elHelpfulNote.appendChild(document.createTextNode('Paste this command into your terminal. Uses '));
var code2 = document.createElement('code');
code2.className = 'text-roon-300 bg-roon-900/30 px-1 py-0.5 rounded font-mono';
code2.textContent = '--network host';
elHelpfulNote.appendChild(code2);
elHelpfulNote.appendChild(document.createTextNode(" for Roon's device discovery."));
}
}
// --- Core generate ---
function generate() {
var cfg = readConfig();
// Toggle conditional UI with animation
if (cfg.tz) {
elTzInputWrap.style.maxHeight = '60px';
elTzInputWrap.style.opacity = '1';
} else {
elTzInputWrap.style.maxHeight = '0';
elTzInputWrap.style.opacity = '0';
}
if (currentTab === 'compose') {
highlightYaml(generateCompose(cfg), elOutput);
} else {
highlightShell(generateRun(cfg), elOutput);
}
}
// --- Get raw text from output ---
function getRawText() {
var lines = [];
var rows = elOutput.querySelectorAll('tr');
rows.forEach(function(row) {
var cells = row.querySelectorAll('td');
if (cells.length >= 2) {
lines.push(cells[1].textContent);
}
});
return lines.join('\n');
}
// --- Platform selection ---
function setPlatform(platform) {
var p = platforms[platform];
if (!p) return;
setVal('vol-roon', p.roon);
setVal('vol-music', p.music);
setVal('vol-backup', p.backup);
elPlatformHint.textContent = p.hint;
generate();
}
// --- Tab switching ---
function setTab(tab) {
currentTab = tab;
if (tab === 'compose') {
elTabCompose.className = 'tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 bg-roon-400/15 text-white ring-1 ring-roon-400/40';
elTabCompose.setAttribute('aria-selected', 'true');
elTabRun.className = 'tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 text-surface-300 hover:text-white';
elTabRun.setAttribute('aria-selected', 'false');
elEditorFilename.textContent = 'docker-compose.yml';
elBtnDownload.style.display = '';
} else {
elTabRun.className = 'tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 bg-roon-400/15 text-white ring-1 ring-roon-400/40';
elTabRun.setAttribute('aria-selected', 'true');
elTabCompose.className = 'tab-btn px-4 py-1.5 rounded-md text-sm font-medium transition-all duration-200 text-surface-300 hover:text-white';
elTabCompose.setAttribute('aria-selected', 'false');
elEditorFilename.textContent = 'terminal';
elBtnDownload.style.display = '';
}
updateNote();
generate();
}
// --- Copy ---
function copyToClipboard() {
var text = getRawText();
navigator.clipboard.writeText(text).then(function() {
elBtnCopy.style.borderColor = '#22c55e';
elIconCopy.classList.add('hidden');
elIconCheck.classList.remove('hidden');
elCopyStatus.textContent = 'Configuration copied to clipboard.';
setTimeout(function() {
elBtnCopy.style.borderColor = '';
elIconCopy.classList.remove('hidden');
elIconCheck.classList.add('hidden');
elCopyStatus.textContent = '';
}, 2000);
});
}
// --- Download ---
function downloadFile() {
var text = getRawText();
var blob = new Blob([text], { type: 'text/yaml' });
var url = URL.createObjectURL(blob);
var a = document.createElement('a');
a.href = url;
a.download = currentTab === 'compose' ? 'docker-compose.yml' : 'docker-run.sh';
a.click();
URL.revokeObjectURL(url);
}
// --- Event binding ---
document.getElementById('platform-select').addEventListener('change', function() {
setPlatform(this.value);
refreshExtraVolumeWarnings();
});
// --- Extra volume management ---
var extraVolContainer = document.getElementById('extra-volumes');
var extraVolCounter = 0;
document.getElementById('btn-add-volume').addEventListener('click', function() {
extraVolCounter++;
var row = document.createElement('div');
row.className = 'extra-vol-row border-t border-surface-500/30 pt-4';
var label = document.createElement('div');
label.className = 'flex items-center justify-between mb-2';
var labelText = document.createElement('span');
labelText.className = 'text-sm font-medium text-white';
labelText.textContent = 'Additional mount';
var removeBtn = document.createElement('button');
removeBtn.type = 'button';
removeBtn.setAttribute('aria-label', 'Remove volume mount');
removeBtn.setAttribute('data-tooltip', 'Remove volume mount');
removeBtn.className = 'inline-flex items-center justify-center w-6 h-6 text-surface-300 hover:text-red-400 transition-colors duration-200 rounded';
var svgNS = 'http://www.w3.org/2000/svg';
var svg = document.createElementNS(svgNS, 'svg');
svg.setAttribute('class', 'w-4 h-4');
svg.setAttribute('fill', 'none');
svg.setAttribute('stroke', 'currentColor');
svg.setAttribute('stroke-width', '2');
svg.setAttribute('viewBox', '0 0 24 24');
var path = document.createElementNS(svgNS, 'path');
path.setAttribute('d', 'M18 6L6 18M6 6l12 12');
svg.appendChild(path);
removeBtn.appendChild(svg);
removeBtn.addEventListener('click', function() {
row.remove();
generate();
});
label.appendChild(labelText);
label.appendChild(removeBtn);
var inputWrap = document.createElement('div');
inputWrap.className = 'flex gap-2';
var inputClass = 'flex-1 px-3 py-2 bg-surface-700 border border-surface-500/50 rounded-lg text-sm font-mono text-slate-200 focus:border-roon-400 focus:ring-1 focus:ring-roon-400 transition-colors duration-200 outline-none';
var hostInput = document.createElement('input');
hostInput.type = 'text';
hostInput.className = 'extra-vol-host ' + inputClass;
hostInput.placeholder = '/host/path';
hostInput.value = platforms[currentPlatform()].prefix;
var sep = document.createElement('span');
sep.className = 'self-center text-surface-300 text-sm flex-shrink-0';
sep.textContent = ':';
var containerInput = document.createElement('input');
containerInput.type = 'text';
containerInput.className = 'extra-vol-container ' + inputClass;
containerInput.placeholder = '/container/path';
containerInput.addEventListener('input', generate);
inputWrap.appendChild(hostInput);
inputWrap.appendChild(sep);
inputWrap.appendChild(containerInput);
var warning = document.createElement('p');
warning.className = 'extra-vol-warning text-xs text-amber-400 mt-1.5 hidden';
hostInput.addEventListener('input', function() {
updateExtraVolumeWarning(row);
generate();
});
row.appendChild(label);
row.appendChild(inputWrap);
row.appendChild(warning);
extraVolContainer.appendChild(row);
updateExtraVolumeWarning(row);
hostInput.focus();
hostInput.setSelectionRange(hostInput.value.length, hostInput.value.length);
});