Vereinfachung: Einheitlicher Port 8199, Nightly Badge über Umgebungsvariable REACT_APP_VERSION
This commit is contained in:
parent
067a92b7c4
commit
517182b778
4 changed files with 13 additions and 10 deletions
|
|
@ -15,16 +15,16 @@ git push -u origin feature/mein-experiment
|
||||||
|
|
||||||
### 3. Feature Version testen
|
### 3. Feature Version testen
|
||||||
```bash
|
```bash
|
||||||
# Feature Version starten (Port 3001)
|
# Feature Version starten (ersetzt Stable Version)
|
||||||
docker-compose -f docker-compose.feature.yml up -d
|
docker-compose -f docker-compose.feature.yml up -d
|
||||||
|
|
||||||
# Hauptversion läuft weiter auf Port 3000
|
# Beide Versionen verwenden Port 8199
|
||||||
# Feature Version läuft auf Port 3001
|
# Nightly Version zeigt "Nightly" Badge im Header
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. In Portainer
|
### 4. In Portainer
|
||||||
- **Hauptversion:** `flex420/discordsoundbot-vib:latest` (Port 3000)
|
- **Stable Version:** `flex420/discordsoundbot-vib:latest` (Port 8199)
|
||||||
- **Feature Version:** `flex420/discordsoundbot-vib:feature-nightly` (Port 3001)
|
- **Nightly Version:** `flex420/discordsoundbot-vib:feature-nightly` (Port 8199)
|
||||||
|
|
||||||
### 5. Mergen wenn bereit
|
### 5. Mergen wenn bereit
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -42,7 +42,7 @@ git branch -d feature/mein-experiment
|
||||||
- `:sha-abc123` - Spezifischer Commit
|
- `:sha-abc123` - Spezifischer Commit
|
||||||
|
|
||||||
## Portainer Setup
|
## Portainer Setup
|
||||||
1. **Hauptcontainer:** Port 3000, Image `:latest`
|
1. **Stable Container:** Port 8199, Image `:latest`
|
||||||
2. **Feature Container:** Port 3001, Image `:feature-nightly`
|
2. **Nightly Container:** Port 8199, Image `:feature-nightly`
|
||||||
3. **Testing:** Feature auf Port 3001 testen
|
3. **Testing:** Nightly Version zeigt "Nightly" Badge im Header
|
||||||
4. **Deployment:** Wenn gut, Feature in main mergen
|
4. **Deployment:** Wenn gut, Feature in main mergen
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,13 @@ services:
|
||||||
container_name: jukebox-feature
|
container_name: jukebox-feature
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "3001:3000" # Anderer Port für Feature Testing
|
- "8199:8080" # Gleicher Port wie Stable
|
||||||
environment:
|
environment:
|
||||||
- DISCORD_TOKEN=${DISCORD_TOKEN}
|
- DISCORD_TOKEN=${DISCORD_TOKEN}
|
||||||
- CLIENT_ID=${CLIENT_ID}
|
- CLIENT_ID=${CLIENT_ID}
|
||||||
- GUILD_ID=${GUILD_ID}
|
- GUILD_ID=${GUILD_ID}
|
||||||
- ADMIN_PWD=${ADMIN_PWD}
|
- ADMIN_PWD=${ADMIN_PWD}
|
||||||
|
- REACT_APP_VERSION=nightly
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/sounds:/data/sounds
|
- ./data/sounds:/data/sounds
|
||||||
- ./data/uploads:/data/uploads
|
- ./data/uploads:/data/uploads
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ services:
|
||||||
- "8199:8080"
|
- "8199:8080"
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
environment:
|
||||||
|
- REACT_APP_VERSION=stable
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/sounds:/data/sounds
|
- ./data/sounds:/data/sounds
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ export default function App() {
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-4xl font-bold">
|
<h1 className="text-4xl font-bold">
|
||||||
Jukebox 420
|
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>
|
<span className="text-sm text-red-400 ml-2">Nightly</span>
|
||||||
)}
|
)}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue