From 40e31f4b3dd25a9423f66345da466970266f9bdb Mon Sep 17 00:00:00 2001 From: maziggy Date: Sun, 14 Dec 2025 10:15:16 +0100 Subject: [PATCH] Added Docker section to README --- README.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c367dc851..80b565b49 100644 --- a/README.md +++ b/README.md @@ -214,12 +214,91 @@ cd bambuddy docker compose up -d ``` -To update or rebuild after pulling changes: +Open **http://localhost:8000** in your browser. + +
+Docker Configuration & Commands + +**Environment Variables:** + +| Variable | Default | Description | +|----------|---------|-------------| +| `TZ` | `UTC` | Your timezone (e.g., `America/New_York`, `Europe/Berlin`) | +| `DEBUG` | `false` | Enable debug logging | +| `LOG_LEVEL` | `INFO` | Log level: `DEBUG`, `INFO`, `WARNING`, `ERROR` | + +**Data Persistence:** + +| Volume | Purpose | +|--------|---------| +| `bambuddy.db` | SQLite database with all your print data | +| `archive/` | Archived 3MF files and thumbnails | +| `logs/` | Application logs | + +**Updating:** + ```bash -git pull -docker compose up --build -d +cd bambuddy && git pull && docker compose up -d --build ``` +**Useful Commands:** + +```bash +# View logs +docker compose logs -f + +# Stop/Start +docker compose down +docker compose up -d + +# Shell access +docker compose exec bambuddy /bin/bash +``` + +**Custom Port:** + +```yaml +ports: + - "3000:8000" # Access on port 3000 +``` + +**Reverse Proxy (Nginx):** + +```nginx +server { + listen 443 ssl http2; + server_name bambuddy.yourdomain.com; + + ssl_certificate /path/to/cert.pem; + ssl_certificate_key /path/to/key.pem; + + location / { + proxy_pass http://localhost:8000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 86400; + } +} +``` + +> **Note:** WebSocket support is required for real-time printer updates. + +**Network Mode Host** (for easier printer discovery): + +```yaml +services: + bambuddy: + build: . + network_mode: host +``` + +
+ #### Manual Installation ```bash