From 2ca10e851a9f89a84ad56b59f775aee5ce2790ae Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sat, 10 Jan 2026 12:20:02 +0100 Subject: [PATCH] added initcontainer and script to embed missing icons --- booking-system/booking.yaml | 45 ++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/booking-system/booking.yaml b/booking-system/booking.yaml index 7c4cfa0..d7812d5 100644 --- a/booking-system/booking.yaml +++ b/booking-system/booking.yaml @@ -191,10 +191,47 @@ spec: sleep 2 done echo "Redis is ready!" + # Fetch missing icons + - name: fetch-icons + image: alpine:3.20 + command: + - sh + - -c + - | + echo "Downloading missing icons..." + apk add --no-cache wget unzip + wget -O /icons/icons.zip https://web.dooplex.hu/static/calcom-icons/icons.zip + cd /icons + unzip -o icons.zip + rm icons.zip + echo "Icons downloaded and extracted:" + ls -la /icons/ + volumeMounts: + - name: missing-icons + mountPath: /icons containers: - name: calcom image: calcom/cal.com:v6.0.8 imagePullPolicy: IfNotPresent + command: + - /bin/sh + - -c + - | + echo "Copying missing icons..." + for icon in /missing-icons/*.svg; do + if [ -f "$icon" ]; then + app_name=$(basename "$icon" .svg) + target_dir="/calcom/packages/app-store/${app_name}/static" + if [ -d "$target_dir" ]; then + cp "$icon" "${target_dir}/icon.svg" + echo "Copied icon for ${app_name}" + else + echo "Warning: Directory ${target_dir} not found, skipping ${app_name}" + fi + fi + done + echo "Starting Cal.com..." + exec yarn start env: # License (empty for AGPL, set key for enterprise features) - name: CALCOM_LICENSE_KEY @@ -318,7 +355,10 @@ spec: # CSP - needed for embedded iframes if you want to embed booking widget - name: CSP_POLICY value: "" - + volumeMounts: + - name: missing-icons + mountPath: /missing-icons + readOnly: true ports: - containerPort: 3000 name: http @@ -351,6 +391,9 @@ spec: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 30 + volumes: + - name: missing-icons + emptyDir: {} --- apiVersion: v1 kind: Service