Add Flux CD configuration and update Neon Vortex HTML5 export
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled

- Add Flux GitRepository and HelmRelease manifests for automated deployment
- Update Neon Vortex game files (HTML5 export with WASM optimization)
- Add Kubernetes manifests: Kaniko build job, MPD config, and Ingress
- Add MPD Docker configuration with improved settings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Neon Vortex
2025-11-22 21:39:02 -05:00
parent ce8d9029c1
commit 67a6ae146f
16 changed files with 478 additions and 5 deletions

10
flux-gitrepository.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: neon-vortex
namespace: flux-system
spec:
interval: 1m
url: http://192.168.1.49:13001/admin/neon-vortex.git
ref:
branch: main

21
flux-helmrelease.yaml Normal file
View File

@@ -0,0 +1,21 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: neon-vortex
namespace: default
spec:
interval: 5m
chart:
spec:
chart: ./neon-vortex-chart
sourceRef:
kind: GitRepository
name: neon-vortex
namespace: flux-system
interval: 1m
values:
image:
registry: images.caffeinetux.com
repository: apps/neon-vortex
tag: latest
pullPolicy: Always

View File

@@ -112,8 +112,8 @@ body {
<script src="Neon Vortex.js"></script>
<script>
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"Neon Vortex","experimentalVK":true,"fileSizes":{"Neon Vortex.pck":256776,"Neon Vortex.wasm":36160334},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"Neon Vortex.service.worker.js"};
const GODOT_THREADS_ENABLED = false;
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"Neon Vortex","experimentalVK":true,"fileSizes":{"Neon Vortex.pck":256776,"Neon Vortex.wasm":1660816},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"Neon Vortex.service.worker.js"};
const GODOT_THREADS_ENABLED = true;
const engine = new Engine(GODOT_CONFIG);
(function () {

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -4,7 +4,7 @@
// Incrementing CACHE_VERSION will kick off the install event and force
// previously cached resources to be updated from the network.
/** @type {string} */
const CACHE_VERSION = '1760987692|36690190516';
const CACHE_VERSION = '1763861785|340163484';
/** @type {string} */
const CACHE_PREFIX = 'Neon Vortex-sw-cache-';
const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION;
@@ -17,7 +17,7 @@ const ENSURE_CROSSORIGIN_ISOLATION_HEADERS = true;
const CACHED_FILES = ["Neon Vortex.html","Neon Vortex.js","Neon Vortex.offline.html","Neon Vortex.icon.png","Neon Vortex.apple-touch-icon.png","Neon Vortex.audio.worklet.js","Neon Vortex.audio.position.worklet.js"];
// Files that we might not want the user to preload, and will only be cached on first load.
/** @type {string[]} */
const CACHEABLE_FILES = ["Neon Vortex.wasm","Neon Vortex.pck"];
const CACHEABLE_FILES = ["Neon Vortex.wasm","Neon Vortex.pck","Neon Vortex.side.wasm"];
const FULL_CACHE = CACHED_FILES.concat(CACHEABLE_FILES);
self.addEventListener('install', (event) => {

BIN
htlm/Neon Vortex.side.wasm Normal file

Binary file not shown.

Binary file not shown.

BIN
htlm/icon-temp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

44
kaniko-build-job.yaml Normal file
View File

@@ -0,0 +1,44 @@
apiVersion: batch/v1
kind: Job
metadata:
name: neon-vortex-build
namespace: default
spec:
ttlSecondsAfterFinished: 3600
template:
spec:
restartPolicy: Never
initContainers:
- name: git-clone
image: alpine/git:latest
command:
- sh
- -c
- |
git clone http://192.168.1.49:13001/admin/neon-vortex.git /workspace
volumeMounts:
- name: workspace
mountPath: /workspace
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--dockerfile=/workspace/htlm/Dockerfile"
- "--context=/workspace/htlm"
- "--destination=images.caffeinetux.com/apps/neon-vortex:latest"
- "--cache=true"
- "--cache-repo=images.caffeinetux.com/apps/neon-vortex/cache"
volumeMounts:
- name: workspace
mountPath: /workspace
- name: docker-config
mountPath: /kaniko/.docker
volumes:
- name: workspace
emptyDir: {}
- name: docker-config
secret:
secretName: harbor-registry
items:
- key: .dockerconfigjson
path: config.json

127
mpd-build-configmap.yaml Normal file
View File

@@ -0,0 +1,127 @@
apiVersion: v1
data:
Dockerfile: |
# Optimized MPD Docker Image with latest packages
# Multi-architecture support: amd64, arm64, armv7
FROM alpine:3.21
# Install MPD and all audio codecs/plugins
RUN apk add --no-cache \
# Core MPD
mpd \
mpd-doc \
# Audio encoders/decoders
lame \
lame-doc \
opus \
opus-tools \
vorbis-tools \
flac \
wavpack \
faad2 \
# FFmpeg for broader codec support
ffmpeg \
ffmpeg-libs \
# Network protocols
libsmbclient \
libnfs \
curl \
# Audio outputs
alsa-lib \
pulseaudio \
pipewire \
# Utilities
bash \
tini \
# Development tools for debugging (optional, remove to reduce size)
# ncmpcpp \
# mpc \
&& rm -rf /var/cache/apk/*
# Create MPD directories with proper permissions
RUN mkdir -p \
/var/lib/mpd \
/var/lib/mpd/music \
/var/lib/mpd/playlists \
/var/lib/mpd/data \
/var/log/mpd \
/run/mpd \
&& chown -R mpd:audio /var/lib/mpd /var/log/mpd /run/mpd
# Copy optimized default configuration
COPY mpd.conf /etc/mpd.conf
RUN chown mpd:audio /etc/mpd.conf
# Expose MPD control port and HTTP streaming port
EXPOSE 6600 8000
# Use tini as init system for proper signal handling
ENTRYPOINT ["/sbin/tini", "--"]
# Run MPD in foreground as mpd user
USER mpd
CMD ["mpd", "--no-daemon", "--stderr", "/etc/mpd.conf"]
mpd.conf: |
# MPD Configuration - Optimized for Kubernetes/Network Streaming
# This is a default config that can be overridden by ConfigMap
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/data/database"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/data/state"
sticker_file "/var/lib/mpd/data/sticker.sql"
# Network settings
bind_to_address "0.0.0.0"
port "6600"
zeroconf_enabled "no"
# Performance tuning - Optimized for network streaming over NFS
audio_buffer_size "32768" # 32MB buffer for smooth playback
max_output_buffer_size "131072" # 128MB output buffer
connection_timeout "60" # 60 second timeout for slow networks
max_connections "20" # Support more concurrent clients
max_playlist_length "32768" # Large playlist support
# Database settings
auto_update "yes"
auto_update_depth "4"
filesystem_charset "UTF-8"
# Logging
log_level "default"
#log_level "verbose" # Uncomment for debugging
# HTTP streaming output - High quality MP3 (320kbps)
audio_output {
type "httpd"
name "HTTP Stream"
encoder "lame"
port "8000"
bitrate "320"
format "44100:16:2"
max_clients "10"
always_on "yes"
tags "yes"
mixer_type "software"
}
# FIFO output for visualizers (optional)
audio_output {
type "fifo"
name "FIFO"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
# Null output as fallback
audio_output {
type "null"
name "Null Output"
}
kind: ConfigMap
metadata:
name: mpd-build-files
namespace: media

59
mpd-build-job.yaml Normal file
View File

@@ -0,0 +1,59 @@
apiVersion: batch/v1
kind: Job
metadata:
name: mpd-build
namespace: media
spec:
ttlSecondsAfterFinished: 3600
template:
spec:
restartPolicy: Never
initContainers:
- name: prepare-context
image: alpine/git:latest
command:
- sh
- -c
- |
mkdir -p /workspace/mpd
# We'll copy the files directly since they're in the ConfigMap
echo "Build context prepared"
volumeMounts:
- name: workspace
mountPath: /workspace
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--dockerfile=/workspace/mpd/Dockerfile"
- "--context=/workspace/mpd"
- "--destination=images.caffeinetux.com/apps/mpd:latest"
- "--destination=images.caffeinetux.com/apps/mpd:alpine-3.21"
- "--cache=true"
- "--cache-repo=images.caffeinetux.com/apps/mpd/cache"
volumeMounts:
- name: workspace
mountPath: /workspace
- name: docker-config
mountPath: /kaniko/.docker
- name: dockerfile
mountPath: /workspace/mpd/Dockerfile
subPath: Dockerfile
- name: mpd-config
mountPath: /workspace/mpd/mpd.conf
subPath: mpd.conf
volumes:
- name: workspace
emptyDir: {}
- name: docker-config
secret:
secretName: harbor-registry
items:
- key: .dockerconfigjson
path: config.json
- name: dockerfile
configMap:
name: mpd-build-files
- name: mpd-config
configMap:
name: mpd-build-files

65
mpd-improved-config.yaml Normal file
View File

@@ -0,0 +1,65 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mpd-config
namespace: media
labels:
app.kubernetes.io/instance: mpd
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: mpd
app.kubernetes.io/version: latest
helm.sh/chart: mpd-0.1.0
annotations:
meta.helm.sh/release-name: mpd
meta.helm.sh/release-namespace: media
data:
mpd.conf: |
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/data/database"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/data/state"
sticker_file "/var/lib/mpd/data/sticker.sql"
bind_to_address "0.0.0.0"
port "6600"
zeroconf_enabled "no"
# Performance tuning - SIGNIFICANTLY INCREASED buffer settings for network streaming
# These larger buffers help prevent glitches especially with NFS storage
audio_buffer_size "32768" # Increased from 8192 to 32MB (4x larger)
max_output_buffer_size "131072" # Increased from 16384 to 128MB (8x larger)
# Additional performance settings
connection_timeout "60" # Give more time for slow network operations
max_connections "20" # Allow more concurrent connections
max_playlist_length "32768" # Support larger playlists
# Filesystem charset for better compatibility
filesystem_charset "UTF-8"
# Auto-update database when files change
auto_update "yes"
auto_update_depth "4"
# HTTP streaming output - High quality MP3
audio_output {
type "httpd"
name "HTTP Stream"
encoder "lame"
port "8000"
bitrate "320"
format "44100:16:2"
max_clients "10"
always_on "yes"
tags "yes"
mixer_type "software"
}
# Optional: FIFO output for visualizers
audio_output {
type "fifo"
name "FIFO"
path "/tmp/mpd.fifo"
format "44100:16:2"
}

60
mpd/Dockerfile Normal file
View File

@@ -0,0 +1,60 @@
# Optimized MPD Docker Image with latest packages
# Multi-architecture support: amd64, arm64, armv7
FROM alpine:3.21
# Install MPD and all audio codecs/plugins
RUN apk add --no-cache \
# Core MPD
mpd \
mpd-doc \
# Audio encoders/decoders
lame \
lame-doc \
opus \
opus-tools \
vorbis-tools \
flac \
wavpack \
faad2 \
# FFmpeg for broader codec support
ffmpeg \
ffmpeg-libs \
# Network protocols
libsmbclient \
libnfs \
curl \
# Audio outputs
alsa-lib \
pulseaudio \
pipewire \
# Utilities
bash \
tini \
# Development tools for debugging (optional, remove to reduce size)
# ncmpcpp \
# mpc \
&& rm -rf /var/cache/apk/*
# Create MPD directories with proper permissions
RUN mkdir -p \
/var/lib/mpd \
/var/lib/mpd/music \
/var/lib/mpd/playlists \
/var/lib/mpd/data \
/var/log/mpd \
/run/mpd \
&& chown -R mpd:audio /var/lib/mpd /var/log/mpd /run/mpd
# Copy optimized default configuration
COPY mpd.conf /etc/mpd.conf
RUN chown mpd:audio /etc/mpd.conf
# Expose MPD control port and HTTP streaming port
EXPOSE 6600 8000
# Use tini as init system for proper signal handling
ENTRYPOINT ["/sbin/tini", "--"]
# Run MPD in foreground as mpd user
USER mpd
CMD ["mpd", "--no-daemon", "--stderr", "/etc/mpd.conf"]

59
mpd/mpd.conf Normal file
View File

@@ -0,0 +1,59 @@
# MPD Configuration - Optimized for Kubernetes/Network Streaming
# This is a default config that can be overridden by ConfigMap
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/data/database"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/data/state"
sticker_file "/var/lib/mpd/data/sticker.sql"
# Network settings
bind_to_address "0.0.0.0"
port "6600"
zeroconf_enabled "no"
# Performance tuning - Optimized for network streaming over NFS
audio_buffer_size "32768" # 32MB buffer for smooth playback
max_output_buffer_size "131072" # 128MB output buffer
connection_timeout "60" # 60 second timeout for slow networks
max_connections "20" # Support more concurrent clients
max_playlist_length "32768" # Large playlist support
# Database settings
auto_update "yes"
auto_update_depth "4"
filesystem_charset "UTF-8"
# Logging
log_level "default"
#log_level "verbose" # Uncomment for debugging
# HTTP streaming output - High quality MP3 (320kbps)
audio_output {
type "httpd"
name "HTTP Stream"
encoder "lame"
port "8000"
bitrate "320"
format "44100:16:2"
max_clients "10"
always_on "yes"
tags "yes"
mixer_type "software"
}
# FIFO output for visualizers (optional)
audio_output {
type "fifo"
name "FIFO"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
# Null output as fallback
audio_output {
type "null"
name "Null Output"
}

25
neon-vortex-ingress.yaml Normal file
View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: neon-vortex
namespace: default
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
rules:
- host: nv.caffeinetux.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: neon-vortex
port:
number: 80
tls:
- hosts:
- nv.caffeinetux.com
secretName: neon-vortex-tls