Vereinfachung: Einheitlicher Port 8199, Nightly Badge über Umgebungsvariable REACT_APP_VERSION

This commit is contained in:
vibe-bot 2025-08-09 02:22:50 +02:00
parent 067a92b7c4
commit 517182b778
4 changed files with 13 additions and 10 deletions

View file

@ -15,16 +15,16 @@ git push -u origin feature/mein-experiment
### 3. Feature Version testen
```bash
# Feature Version starten (Port 3001)
# Feature Version starten (ersetzt Stable Version)
docker-compose -f docker-compose.feature.yml up -d
# Hauptversion läuft weiter auf Port 3000
# Feature Version läuft auf Port 3001
# Beide Versionen verwenden Port 8199
# Nightly Version zeigt "Nightly" Badge im Header
```
### 4. In Portainer
- **Hauptversion:** `flex420/discordsoundbot-vib:latest` (Port 3000)
- **Feature Version:** `flex420/discordsoundbot-vib:feature-nightly` (Port 3001)
- **Stable Version:** `flex420/discordsoundbot-vib:latest` (Port 8199)
- **Nightly Version:** `flex420/discordsoundbot-vib:feature-nightly` (Port 8199)
### 5. Mergen wenn bereit
```bash
@ -42,7 +42,7 @@ git branch -d feature/mein-experiment
- `:sha-abc123` - Spezifischer Commit
## Portainer Setup
1. **Hauptcontainer:** Port 3000, Image `:latest`
2. **Feature Container:** Port 3001, Image `:feature-nightly`
3. **Testing:** Feature auf Port 3001 testen
1. **Stable Container:** Port 8199, Image `:latest`
2. **Nightly Container:** Port 8199, Image `:feature-nightly`
3. **Testing:** Nightly Version zeigt "Nightly" Badge im Header
4. **Deployment:** Wenn gut, Feature in main mergen

View file

@ -6,12 +6,13 @@ services:
container_name: jukebox-feature
restart: unless-stopped
ports:
- "3001:3000" # Anderer Port für Feature Testing
- "8199:8080" # Gleicher Port wie Stable
environment:
- DISCORD_TOKEN=${DISCORD_TOKEN}
- CLIENT_ID=${CLIENT_ID}
- GUILD_ID=${GUILD_ID}
- ADMIN_PWD=${ADMIN_PWD}
- REACT_APP_VERSION=nightly
volumes:
- ./data/sounds:/data/sounds
- ./data/uploads:/data/uploads

View file

@ -6,6 +6,8 @@ services:
- "8199:8080"
env_file:
- .env
environment:
- REACT_APP_VERSION=stable
volumes:
- ./data/sounds:/data/sounds
restart: unless-stopped

View file

@ -179,7 +179,7 @@ export default function App() {
<div>
<h1 className="text-4xl font-bold">
Jukebox 420
{window.location.hostname.includes('localhost') && window.location.port === '3001' && (
{process.env.REACT_APP_VERSION === 'nightly' && (
<span className="text-sm text-red-400 ml-2">Nightly</span>
)}
</h1>