docker deployment patch with verification and broken UI fixes (#1)

* 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
This commit is contained in:
RunLit
2026-02-21 15:03:16 +11:00
committed by GitHub
parent 47d0251494
commit 6376b4cc94
21 changed files with 2866 additions and 166 deletions

View File

@@ -3,6 +3,10 @@
import os
import sys
# Ensure the project root (/app) is on sys.path so that both 'standalone'
# and 'bambu_run' are importable regardless of where this script is invoked from.
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "standalone.settings")

View File

@@ -19,7 +19,7 @@ SECRET_KEY = os.environ.get(
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get("DEBUG", "True").lower() in ("true", "1", "yes")
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "localhost,127.0.0.1").split(",")
ALLOWED_HOSTS = ["*"]
# Application definition
INSTALLED_APPS = [
@@ -34,6 +34,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
@@ -90,6 +91,8 @@ USE_TZ = True
# Static files
STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
STATICFILES_DIRS = [BASE_DIR / "standalone" / "static"]
STATICFILES_STORAGE = "whitenoise.storage.CompressedStaticFilesStorage"
# Default primary key field type
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
@@ -101,7 +104,7 @@ LOGOUT_REDIRECT_URL = "/accounts/login/"
# Bambu Run settings
BAMBU_RUN_TIMEZONE = os.environ.get("TIMEZONE", "UTC")
BAMBU_RUN_BASE_TEMPLATE = "bambu_run/base.html"
BAMBU_RUN_BASE_TEMPLATE = "standalone_base.html"
# Printer connection — read from environment
PRINTER_IP = os.environ.get("PRINTER_IP", "")

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

View File

@@ -0,0 +1,21 @@
{% extends "bambu_run/base.html" %}
{% load static %}
{% block extra_head %}
<link rel="icon" type="image/png" href="{% static 'favicon-32.png' %}">
{% endblock %}
{% block sidebar_brand_icon %}
<img src="{% static 'favicon-64.png' %}" alt="Bambu Run" width="32" height="32" style="flex-shrink:0;">
{% endblock %}
{% block logout_nav %}
{% if user.is_authenticated %}
<li class="nav-item">
<form method="post" action="{% url 'logout' %}" style="margin:0;">
{% csrf_token %}
<button type="submit" class="nav-link">Logout</button>
</form>
</li>
{% endif %}
{% endblock %}