feat: serve Element Desktop setup scripts via Element Web at /docs/setup/
This commit is contained in:
parent
659acdf601
commit
336f2aa1cb
285
apps/production/custom-configs/element-web-docs-configmap.yaml
Normal file
285
apps/production/custom-configs/element-web-docs-configmap.yaml
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: ess-element-web-docs
|
||||||
|
namespace: matrix
|
||||||
|
data:
|
||||||
|
# README
|
||||||
|
"setup/README-Element-Setup.md": |
|
||||||
|
# Element Desktop Setup Scripts
|
||||||
|
|
||||||
|
Automatische Konfiguration und Installation von Element Desktop mit Custom Themes für aXion1337.Chat
|
||||||
|
|
||||||
|
## 📋 Systemanforderungen
|
||||||
|
|
||||||
|
- **Windows 10/11**
|
||||||
|
- **macOS 10.13+**
|
||||||
|
- **Linux** (Ubuntu, Debian, Fedora, Arch, openSUSE, etc.)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🪟 Windows
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. **Lade die Datei herunter**: `element-setup-windows.cmd`
|
||||||
|
2. **Doppelklick** auf die Datei
|
||||||
|
3. Das Skript wird automatisch:
|
||||||
|
- ✅ Die config.json erstellen
|
||||||
|
- ✅ Element Desktop installieren (falls nötig)
|
||||||
|
- ✅ Element starten
|
||||||
|
|
||||||
|
### Voraussetzungen
|
||||||
|
|
||||||
|
Das Skript versucht automatisch, Element zu installieren über:
|
||||||
|
- Windows Store (Microsoft Store)
|
||||||
|
- WinGet (Windows Package Manager)
|
||||||
|
- Chocolatey
|
||||||
|
|
||||||
|
Falls nichts davon vorhanden ist, installiere Element manuell:
|
||||||
|
https://element.io/download
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🍎 macOS
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. **Lade die Datei herunter**: `element-setup-macos.command`
|
||||||
|
2. **Doppelklick** im Finder
|
||||||
|
3. Das Skript wird automatisch:
|
||||||
|
- ✅ Die config.json erstellen
|
||||||
|
- ✅ Element Desktop installieren (über Homebrew falls nötig)
|
||||||
|
- ✅ Element starten
|
||||||
|
|
||||||
|
### Voraussetzungen
|
||||||
|
|
||||||
|
Das Skript nutzt **Homebrew** (falls vorhanden):
|
||||||
|
```bash
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
```
|
||||||
|
|
||||||
|
Oder installiere Element manuell:
|
||||||
|
https://element.io/download
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🐧 Linux
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. **Lade die Datei herunter**: `element-setup-linux.sh`
|
||||||
|
2. **Im Terminal:**
|
||||||
|
```bash
|
||||||
|
chmod +x element-setup-linux.sh
|
||||||
|
./element-setup-linux.sh
|
||||||
|
```
|
||||||
|
3. Das Skript wird automatisch:
|
||||||
|
- ✅ Die config.json erstellen
|
||||||
|
- ✅ Element Desktop installieren (über apt/dnf/pacman/zypper)
|
||||||
|
- ✅ Element starten
|
||||||
|
|
||||||
|
### Unterstützte Distributionen
|
||||||
|
|
||||||
|
- **Ubuntu/Debian**: `apt`
|
||||||
|
- **Fedora/RHEL**: `dnf`
|
||||||
|
- **Arch Linux**: `pacman`
|
||||||
|
- **openSUSE**: `zypper`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎨 Themes nach Setup
|
||||||
|
|
||||||
|
Nach dem Setup hat dein Element Desktop automatisch alle Custom Themes:
|
||||||
|
- aXion1337 Dark
|
||||||
|
- Deep Purple
|
||||||
|
- Discord Dark
|
||||||
|
- Electric Blue
|
||||||
|
- Everforest dark hard
|
||||||
|
- Gruvbox Dark
|
||||||
|
- Wal
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🆘 Troubleshooting
|
||||||
|
|
||||||
|
### Element startet nicht
|
||||||
|
- Stelle sicher, dass Element Desktop installiert ist
|
||||||
|
- Starten manuell: `element` (Terminal/CMD)
|
||||||
|
|
||||||
|
### config.json wird nicht geladen
|
||||||
|
- Beende Element vollständig (auch in der Taskbar)
|
||||||
|
- Starte Element neu
|
||||||
|
|
||||||
|
### Themes nicht sichtbar
|
||||||
|
- Überprüfe Internetverbindung
|
||||||
|
- `https://axion1337.chat/config.json` sollte erreichbar sein
|
||||||
|
|
||||||
|
# Windows Script
|
||||||
|
"setup/element-setup-windows.cmd": |
|
||||||
|
@echo off
|
||||||
|
REM Element Desktop Setup Script for Windows
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
echo ========================================
|
||||||
|
echo Element Desktop Konfiguration Setup
|
||||||
|
echo ========================================
|
||||||
|
echo.
|
||||||
|
set APPDATA_PATH=%APPDATA%\Element
|
||||||
|
set CONFIG_FILE=%APPDATA_PATH%\config.json
|
||||||
|
if not exist "%APPDATA_PATH%" (
|
||||||
|
echo Erstelle Element Verzeichnis...
|
||||||
|
mkdir "%APPDATA_PATH%"
|
||||||
|
)
|
||||||
|
echo Erstelle config.json...
|
||||||
|
(
|
||||||
|
echo {
|
||||||
|
echo "configUrl": "https://axion1337.chat/config.json",
|
||||||
|
echo "brand": "aXion1337.Chat",
|
||||||
|
echo "default_theme": "aXion1337 Dark",
|
||||||
|
echo "show_labs_settings": true,
|
||||||
|
echo "features": {
|
||||||
|
echo "feature_qr_code_login": true
|
||||||
|
echo },
|
||||||
|
echo "setting_defaults": {
|
||||||
|
echo "custom_themes": []
|
||||||
|
echo }
|
||||||
|
echo }
|
||||||
|
) > "%CONFIG_FILE%"
|
||||||
|
echo Config erstellt: %CONFIG_FILE%
|
||||||
|
echo.
|
||||||
|
echo Ueberpruefen Sie ob Element Desktop installiert ist...
|
||||||
|
where element >nul 2>nul
|
||||||
|
if %ERRORLEVEL% == 0 (
|
||||||
|
echo Starte Element Desktop...
|
||||||
|
start element
|
||||||
|
timeout /t 2 >nul
|
||||||
|
echo Done!
|
||||||
|
pause
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
winget list --name "Element" >nul 2>nul
|
||||||
|
if %ERRORLEVEL% == 0 (
|
||||||
|
echo WinGet gefunden. Installiere Element...
|
||||||
|
winget install Element.Element --silent
|
||||||
|
timeout /t 3 >nul
|
||||||
|
start element
|
||||||
|
pause
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Element Desktop konnte nicht automatisch installiert werden.
|
||||||
|
echo Bitte installiere Element Desktop manuell:
|
||||||
|
echo https://element.io/download
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
|
||||||
|
# macOS Script
|
||||||
|
"setup/element-setup-macos.command": |
|
||||||
|
#!/bin/bash
|
||||||
|
echo "========================================"
|
||||||
|
echo "Element Desktop Konfiguration Setup"
|
||||||
|
echo "========================================"
|
||||||
|
echo ""
|
||||||
|
CONFIG_DIR="$HOME/Library/Application Support/Element"
|
||||||
|
CONFIG_FILE="$CONFIG_DIR/config.json"
|
||||||
|
if [ ! -d "$CONFIG_DIR" ]; then
|
||||||
|
echo "Erstelle Element Verzeichnis..."
|
||||||
|
mkdir -p "$CONFIG_DIR"
|
||||||
|
fi
|
||||||
|
echo "Erstelle config.json..."
|
||||||
|
cat > "$CONFIG_FILE" << 'EOF'
|
||||||
|
{
|
||||||
|
"configUrl": "https://axion1337.chat/config.json",
|
||||||
|
"brand": "aXion1337.Chat",
|
||||||
|
"default_theme": "aXion1337 Dark",
|
||||||
|
"show_labs_settings": true,
|
||||||
|
"features": {
|
||||||
|
"feature_qr_code_login": true
|
||||||
|
},
|
||||||
|
"setting_defaults": {
|
||||||
|
"custom_themes": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
echo "Config erstellt: $CONFIG_FILE"
|
||||||
|
echo ""
|
||||||
|
echo "Ueberpruefen Sie ob Element Desktop installiert ist..."
|
||||||
|
if [ -d "/Applications/Element.app" ]; then
|
||||||
|
echo "Element im Applications Folder gefunden. Starte Element..."
|
||||||
|
open -a Element
|
||||||
|
sleep 2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if command -v brew &> /dev/null; then
|
||||||
|
echo "Installiere Element uber Homebrew..."
|
||||||
|
brew install element --cask
|
||||||
|
sleep 2
|
||||||
|
open -a Element
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Homebrew nicht gefunden. Bitte installiere zuerst:"
|
||||||
|
echo "https://brew.sh"
|
||||||
|
echo ""
|
||||||
|
echo "Deine config.json wurde erstellt unter:"
|
||||||
|
echo "$CONFIG_FILE"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
read -p "Druecke Enter zum Beenden..."
|
||||||
|
|
||||||
|
# Linux Script
|
||||||
|
"setup/element-setup-linux.sh": |
|
||||||
|
#!/bin/bash
|
||||||
|
echo "========================================"
|
||||||
|
echo "Element Desktop Konfiguration Setup"
|
||||||
|
echo "========================================"
|
||||||
|
echo ""
|
||||||
|
CONFIG_DIR="$HOME/.config/Element"
|
||||||
|
CONFIG_FILE="$CONFIG_DIR/config.json"
|
||||||
|
if [ ! -d "$CONFIG_DIR" ]; then
|
||||||
|
echo "Erstelle Element Verzeichnis..."
|
||||||
|
mkdir -p "$CONFIG_DIR"
|
||||||
|
fi
|
||||||
|
echo "Erstelle config.json..."
|
||||||
|
cat > "$CONFIG_FILE" << 'EOF'
|
||||||
|
{
|
||||||
|
"configUrl": "https://axion1337.chat/config.json",
|
||||||
|
"brand": "aXion1337.Chat",
|
||||||
|
"default_theme": "aXion1337 Dark",
|
||||||
|
"show_labs_settings": true,
|
||||||
|
"features": {
|
||||||
|
"feature_qr_code_login": true
|
||||||
|
},
|
||||||
|
"setting_defaults": {
|
||||||
|
"custom_themes": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
echo "Config erstellt: $CONFIG_FILE"
|
||||||
|
echo ""
|
||||||
|
if command -v apt &> /dev/null; then
|
||||||
|
echo "Installiere Element uber apt..."
|
||||||
|
sudo apt update && sudo apt install -y element-desktop
|
||||||
|
element &
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if command -v dnf &> /dev/null; then
|
||||||
|
echo "Installiere Element uber dnf..."
|
||||||
|
sudo dnf install -y element-desktop
|
||||||
|
element &
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if command -v pacman &> /dev/null; then
|
||||||
|
echo "Installiere Element uber pacman..."
|
||||||
|
sudo pacman -S --noconfirm element-web
|
||||||
|
element &
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Element Desktop konnte nicht automatisch installiert werden."
|
||||||
|
echo "Bitte installiere Element Desktop manuell:"
|
||||||
|
echo "Ubuntu/Debian: sudo apt install element-desktop"
|
||||||
|
echo "Fedora/RHEL: sudo dnf install element-desktop"
|
||||||
|
echo "Arch: sudo pacman -S element-web"
|
||||||
|
echo ""
|
||||||
|
echo "Deine config.json wurde erstellt unter:"
|
||||||
|
echo "$CONFIG_FILE"
|
||||||
@ -61,6 +61,15 @@ spec:
|
|||||||
enabled: true
|
enabled: true
|
||||||
ingress:
|
ingress:
|
||||||
host: axion1337.chat
|
host: axion1337.chat
|
||||||
|
additional:
|
||||||
|
volumes:
|
||||||
|
- name: element-web-docs
|
||||||
|
configMap:
|
||||||
|
name: ess-element-web-docs
|
||||||
|
volumeMounts:
|
||||||
|
- name: element-web-docs
|
||||||
|
mountPath: /usr/share/nginx/html/docs
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
# Element Admin
|
# Element Admin
|
||||||
elementAdmin:
|
elementAdmin:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user