mirror of
https://github.com/RunLit/Bambu-Run.git
synced 2026-06-22 22:19:03 +01:00
* bypass bambu cloud api opencb requirement * project root add to managepy * update instruction to do migration; mqtt login more verbose * migrations up to date model * use migrations from django migrate * print full token to copy paste * allow local network hosts * added side bar toggle * removed standalone css from dashboard css * added icon and fixed text trunction issue * fixed chart missing whitenoise and not rendering * aded favicon and fixed ui issues
76 lines
1.8 KiB
Markdown
76 lines
1.8 KiB
Markdown
# Setup Local Environment for Debug
|
|
|
|
## Prerequisites
|
|
|
|
- Docker Desktop running on macOS
|
|
- Your Bambu Lab account email + password
|
|
- Bambu-Run source at /Users/runnanli/src/Bambu-Run
|
|
|
|
---
|
|
### Step 1 — Create .env
|
|
|
|
Create /Users/runnanli/src/Bambu-Run/.env:
|
|
BAMBU_USERNAME=your_bambulab_email@example.com
|
|
BAMBU_PASSWORD=your_bambulab_password
|
|
TIMEZONE=Australia/Melbourne
|
|
No DB vars needed — SQLite is the default when DB_NAME is absent.
|
|
|
|
---
|
|
### Step 2 — Build the image
|
|
|
|
cd /Users/runnanli/src/Bambu-Run
|
|
docker compose build
|
|
Takes a few minutes first time.
|
|
|
|
---
|
|
### Step 3 — Run database migrations
|
|
|
|
docker compose run --rm bambu-run python standalone/manage.py migrate --noinput
|
|
|
|
---
|
|
### Step 4 — First-time Bambu Lab authentication (email verification)
|
|
|
|
docker compose run --rm bambu-run python standalone/manage.py bambu_collector --once
|
|
|
|
You'll be prompted for a 6-digit code sent to your email. Enter it.
|
|
On success the token is printed:
|
|
Token: eyJhbGci...
|
|
|
|
Add it to .env:
|
|
BAMBU_TOKEN=eyJhbGci...paste_full_token_here
|
|
Future restarts will skip email verification.
|
|
|
|
---
|
|
### Step 5 — Start everything
|
|
|
|
docker compose up -d
|
|
|
|
Supervisord starts three processes: migrate (idempotent), web (gunicorn on :8000), collector (polls printer continuously).
|
|
|
|
---
|
|
### Step 6 — Create a login account
|
|
|
|
docker compose exec bambu-run python standalone/manage.py createsuperuser
|
|
|
|
---
|
|
### Step 7 — Open the dashboard
|
|
|
|
http://localhost:8000
|
|
|
|
---
|
|
### Useful commands
|
|
|
|
#### Watch live logs
|
|
docker compose logs -f
|
|
|
|
#### Stop
|
|
docker compose down
|
|
|
|
#### Rebuild after code changes
|
|
docker compose up -d --build
|
|
|
|
### Notes
|
|
|
|
- SQLite lives inside Docker volume bambu_data — persists across restarts
|
|
- If charts are blank: printer must be on; give collector ~1 minute to start polling
|