Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76d88dd77f |
93
docs/sillyhome-dev-install.md
Normal file
93
docs/sillyhome-dev-install.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# Locale Dev-Umgebung — sillyhome-next-dev
|
||||
|
||||
Ziel: Repo lokal klonen, Backend starten und Änderungen entwickeln, ohne das produktive Add-on direkt zu beeinflussen.
|
||||
|
||||
## Voraussetzungen
|
||||
|
||||
- Git
|
||||
- Python 3.10+
|
||||
- `pip`
|
||||
- Optional: Nginx als Reverse-Proxy
|
||||
|
||||
## 1. Repo klonen
|
||||
|
||||
```bash
|
||||
git clone http://192.168.6.31:3000/Otto/sillyhome-next-dev.git
|
||||
cd sillyhome-next-dev
|
||||
```
|
||||
|
||||
## 2. Abhängigkeiten installieren
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git python3 python3-pip uvicorn
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
## 3. Backend starten (temporär)
|
||||
|
||||
```bash
|
||||
uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
## 4. Backend dauerhaft per systemd starten
|
||||
|
||||
Datei `/etc/systemd/system/sillyhome-dev.service`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Sillyhome Next Dev
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/home/otto/sillyhome-next-dev
|
||||
Environment="PATH=/home/otto/.local/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
ExecStart=/usr/local/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Aktivieren:
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now sillyhome-dev.service
|
||||
```
|
||||
|
||||
## 5. Optional: Nginx Reverse-Proxy
|
||||
|
||||
Datei `/etc/nginx/sites-available/sillyhome-dev`:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 8080;
|
||||
server_name sillyhome-dev.local;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Aktivieren:
|
||||
|
||||
```bash
|
||||
sudo ln -sf /etc/nginx/sites-available/sillyhome-dev /etc/nginx/sites-enabled/
|
||||
sudo nginx -t && sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
## 6. Nur Frontend testen
|
||||
|
||||
```bash
|
||||
cd /home/otto/sillyhome-next-dev/app/static
|
||||
python3 -m http.server 8080 --directory .
|
||||
```
|
||||
|
||||
Danach im Browser `http://127.0.0.1:8080` öffnen.
|
||||
|
||||
## Hinweis für Weiterentwicklung
|
||||
|
||||
Dieser Branch ist für lokale Entwicklungsiterationen gedacht. Änderungen hier sollen einzeln reviewt und danach in den passenden Produktiv-Branch übernommen werden.
|
||||
Reference in New Issue
Block a user