2.0 - WebUI builder ("Cielight" merge) #9
@@ -6,9 +6,8 @@ COPY requirements.txt .
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
RUN pip install --no-cache-dir -r requirements.txt
 | 
					RUN pip install --no-cache-dir -r requirements.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					COPY build.py gallery.py VERSION /app/
 | 
				
			||||||
COPY ./src/ ./src/
 | 
					COPY ./src/ ./src/
 | 
				
			||||||
COPY ./build.py ./build.py
 | 
					 | 
				
			||||||
COPY ./gallery.py ./gallery.py
 | 
					 | 
				
			||||||
COPY ./config /app/default
 | 
					COPY ./config /app/default
 | 
				
			||||||
COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh
 | 
					COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh
 | 
				
			||||||
RUN chmod +x /app/entrypoint.sh
 | 
					RUN chmod +x /app/entrypoint.sh
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,16 +43,24 @@ start_server() {
 | 
				
			|||||||
  cat /tmp/build_logs_fifo >&2 &
 | 
					  cat /tmp/build_logs_fifo >&2 &
 | 
				
			||||||
  cat /tmp/build_logs_fifo2 >&2 &
 | 
					  cat /tmp/build_logs_fifo2 >&2 &
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  echo "Starting HTTP server on port 3000..."
 | 
					  echo "Starting preview HTTP server on port 3000..."
 | 
				
			||||||
  python3 -u -m http.server 3000 -d /app/output &
 | 
					  python3 -u -m http.server 3000 -d /app/output &
 | 
				
			||||||
  SERVER_PID=$!
 | 
					  SERVER_PID=$!
 | 
				
			||||||
  trap "echo 'Stopping server...'; kill -TERM $SERVER_PID 2>/dev/null; wait $SERVER_PID; exit 0" SIGINT SIGTERM
 | 
					
 | 
				
			||||||
 | 
					  echo "Starting Lumeex Flask webui..."
 | 
				
			||||||
 | 
					  python3 -u -m src.py.webui.webui &
 | 
				
			||||||
 | 
					  WEBUI_PID=$!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  trap "echo 'Stopping servers...'; kill -TERM $SERVER_PID $WEBUI_PID 2>/dev/null; wait $SERVER_PID $WEBUI_PID; exit 0" SIGINT SIGTERM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  wait $SERVER_PID
 | 
					  wait $SERVER_PID
 | 
				
			||||||
 | 
					  wait $WEBUI_PID
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VERSION=$(cat VERSION)
 | 
				
			||||||
if [ $# -eq 0 ]; then
 | 
					if [ $# -eq 0 ]; then
 | 
				
			||||||
  echo -e "${CYAN}╭───────────────────────────────────────────╮${NC}"
 | 
					  echo -e "${CYAN}╭───────────────────────────────────────────╮${NC}"
 | 
				
			||||||
  echo -e "${CYAN}│${NC}          Lum${CYAN}eex${NC} - Version 1.3.1${NC}           ${CYAN}│${NC}"
 | 
					  echo -e "${CYAN}│${NC}          Lum${CYAN}eex${NC} - Version ${VERSION}${NC}           ${CYAN}│${NC}"
 | 
				
			||||||
  echo -e "${CYAN}├───────────────────────────────────────────┤${NC}"
 | 
					  echo -e "${CYAN}├───────────────────────────────────────────┤${NC}"
 | 
				
			||||||
  echo -e "${CYAN}│${NC} Source: https://git.djeex.fr/Djeex/lumeex ${CYAN}│${NC}"
 | 
					  echo -e "${CYAN}│${NC} Source: https://git.djeex.fr/Djeex/lumeex ${CYAN}│${NC}"
 | 
				
			||||||
  echo -e "${CYAN}│${NC} Mirror: https://github.com/Djeex/lumeex   ${CYAN}│${NC}"
 | 
					  echo -e "${CYAN}│${NC} Mirror: https://github.com/Djeex/lumeex   ${CYAN}│${NC}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,4 +7,5 @@ services:
 | 
				
			|||||||
      - ../output:/app/output  # mount output directory
 | 
					      - ../output:/app/output  # mount output directory
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "3000:3000"
 | 
					      - "3000:3000"
 | 
				
			||||||
 | 
					      - "5005:5000"
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
@@ -21,12 +21,14 @@ STYLE_DIR = SRC_DIR / "src/public/style"
 | 
				
			|||||||
GALLERY_FILE = SRC_DIR / "config/gallery.yaml"
 | 
					GALLERY_FILE = SRC_DIR / "config/gallery.yaml"
 | 
				
			||||||
SITE_FILE = SRC_DIR / "config/site.yaml"
 | 
					SITE_FILE = SRC_DIR / "config/site.yaml"
 | 
				
			||||||
THEMES_DIR = SRC_DIR / "config/themes"
 | 
					THEMES_DIR = SRC_DIR / "config/themes"
 | 
				
			||||||
 | 
					VERSION_FILE = SRC_DIR / "VERSION"
 | 
				
			||||||
 | 
					with open(VERSION_FILE, "r") as vf:
 | 
				
			||||||
 | 
					    build_version = vf.read().strip()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def build():
 | 
					def build():
 | 
				
			||||||
    build_version = "v1.3.1"
 | 
					 | 
				
			||||||
    logging.info("\n")
 | 
					    logging.info("\n")
 | 
				
			||||||
    logging.info("=" * 24)
 | 
					    logging.info("=" * 24)
 | 
				
			||||||
    logging.info(f"🚀 Lumeex builder {build_version}")
 | 
					    logging.info(f"🚀 Lumeex builder v{build_version}")
 | 
				
			||||||
    logging.info("=" * 24)
 | 
					    logging.info("=" * 24)
 | 
				
			||||||
    logging.info("\n === Starting build === ")
 | 
					    logging.info("\n === Starting build === ")
 | 
				
			||||||
    ensure_dir(BUILD_DIR)
 | 
					    ensure_dir(BUILD_DIR)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,10 @@ from src.py.webui.upload import upload_bp
 | 
				
			|||||||
logging.basicConfig(level=logging.INFO, format="%(message)s")
 | 
					logging.basicConfig(level=logging.INFO, format="%(message)s")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# --- Flask app setup ---
 | 
					# --- Flask app setup ---
 | 
				
			||||||
 | 
					VERSION_FILE = Path(__file__).resolve().parents[3] / "VERSION"
 | 
				
			||||||
 | 
					with open(VERSION_FILE, "r") as vf:
 | 
				
			||||||
 | 
					    lumeex_version = vf.read().strip()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WEBUI_PATH = Path(__file__).parents[2] / "webui"  # Path to static/templates
 | 
					WEBUI_PATH = Path(__file__).parents[2] / "webui"  # Path to static/templates
 | 
				
			||||||
app = Flask(
 | 
					app = Flask(
 | 
				
			||||||
    __name__,
 | 
					    __name__,
 | 
				
			||||||
@@ -68,6 +72,10 @@ def get_local_fonts(theme_name):
 | 
				
			|||||||
def index():
 | 
					def index():
 | 
				
			||||||
    return render_template("index.html")
 | 
					    return render_template("index.html")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@app.context_processor
 | 
				
			||||||
 | 
					def inject_version():
 | 
				
			||||||
 | 
					    return dict(lumeex_version=lumeex_version)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# --- Gallery & Hero API ---
 | 
					# --- Gallery & Hero API ---
 | 
				
			||||||
@app.route("/gallery-editor")
 | 
					@app.route("/gallery-editor")
 | 
				
			||||||
def gallery_editor():
 | 
					def gallery_editor():
 | 
				
			||||||
@@ -479,5 +487,5 @@ def download_output_zip():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# --- Run server ---
 | 
					# --- Run server ---
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    logging.info("Starting WebUI at http://127.0.0.1:5000")
 | 
					    logging.info("Starting WebUI at http://0.0.0.0:5000")
 | 
				
			||||||
    app.run(debug=True)
 | 
					    app.run(host="0.0.0.0", port=5000, debug=True)
 | 
				
			||||||
@@ -112,7 +112,7 @@
 | 
				
			|||||||
    <div class="content-inner">
 | 
					    <div class="content-inner">
 | 
				
			||||||
      <div class="footer-container">
 | 
					      <div class="footer-container">
 | 
				
			||||||
        <div class="footer-credit">
 | 
					        <div class="footer-credit">
 | 
				
			||||||
          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v1.3</a> — © 2025</p>
 | 
					          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v{{ lumeex_version }}</a> — © 2025</p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="footer-links">
 | 
					        <div class="footer-links">
 | 
				
			||||||
          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
					          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,7 @@
 | 
				
			|||||||
    <div class="content-inner">
 | 
					    <div class="content-inner">
 | 
				
			||||||
      <div class="footer-container">
 | 
					      <div class="footer-container">
 | 
				
			||||||
        <div class="footer-credit">
 | 
					        <div class="footer-credit">
 | 
				
			||||||
          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v1.3</a> — © 2025</p>
 | 
					          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v{{ lumeex_version }}</a> — © 2025</p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="footer-links">
 | 
					        <div class="footer-links">
 | 
				
			||||||
          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
					          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -218,7 +218,7 @@
 | 
				
			|||||||
    <div class="content-inner">
 | 
					    <div class="content-inner">
 | 
				
			||||||
      <div class="footer-container">
 | 
					      <div class="footer-container">
 | 
				
			||||||
        <div class="footer-credit">
 | 
					        <div class="footer-credit">
 | 
				
			||||||
          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v1.3</a> — © 2025</p>
 | 
					          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v{{ lumeex_version }}</a> — © 2025</p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="footer-links">
 | 
					        <div class="footer-links">
 | 
				
			||||||
          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
					          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -223,7 +223,7 @@
 | 
				
			|||||||
    <div class="content-inner">
 | 
					    <div class="content-inner">
 | 
				
			||||||
      <div class="footer-container">
 | 
					      <div class="footer-container">
 | 
				
			||||||
        <div class="footer-credit">
 | 
					        <div class="footer-credit">
 | 
				
			||||||
          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v1.3</a> — © 2025</p>
 | 
					          <p><a href="https//lumeex.djeex.fr"><span class="lum-first">Lum</span><span class="lum-second">eex</span> v{{ lumeex_version }}</a> — © 2025</p>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div class="footer-links">
 | 
					        <div class="footer-links">
 | 
				
			||||||
          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
					          <a class="footer-link documentation" href="https://lumeex.djeex.fr"><span class="icon"><img src="/img/favicon.svg"></span><span class="icon-text">Documentation</span></a>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user