From 1e035df46888e524c5980e93151bc799dbbb223f Mon Sep 17 00:00:00 2001 From: ForgQi <34411314+ForgQi@users.noreply.github.com> Date: Fri, 19 Sep 2025 03:34:01 +0800 Subject: [PATCH] Refactor web build output and packaging paths Updated Dockerfile to copy from /biliup/out instead of /biliup/biliup/web/public. Removed web public directory from PyInstaller and pyproject.toml includes. Adjusted build script in package.json to stop copying build output to web/public. These changes streamline the build and packaging process by consolidating output paths. --- Dockerfile | 2 +- biliup.spec | 2 +- package.json | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05463f3..47ae257 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,7 +95,7 @@ RUN set -eux; \ /var/tmp/* \ /var/log/* -COPY --from=webui /biliup/biliup/web/public/ /biliup/biliup/web/public/ +COPY --from=webui /biliup/out /biliup/out WORKDIR /opt ENTRYPOINT ["biliup"] diff --git a/biliup.spec b/biliup.spec index 9ad46c8..b6f2b2a 100644 --- a/biliup.spec +++ b/biliup.spec @@ -1,7 +1,7 @@ # -*- mode: python ; coding: utf-8 -*- from PyInstaller.utils.hooks import collect_all, copy_metadata -datas = [('biliup/database/migration/', 'biliup/database/migration/'), ('biliup/web/public/', 'biliup/web/public/'), ('biliup/Danmaku/douyin_util/', 'biliup/Danmaku/douyin_util/')] +datas = [('biliup/database/migration/', 'biliup/database/migration/'), ('biliup/Danmaku/douyin_util/', 'biliup/Danmaku/douyin_util/')] binaries = [] hiddenimports = [] tmp_ret = collect_all('biliup.plugins') diff --git a/package.json b/package.json index 1175c95..bb06ea1 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build && ncp ./out ./biliup/web/public", + "build": "next build", "start": "next start", "lint": "next lint" }, diff --git a/pyproject.toml b/pyproject.toml index fad91f5..9883e3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "maturin" # "extension-module" tells pyo3 we want to build an extension module (skips linking against libpython.so) features = ["pyo3/extension-module"] # Include additional files -include = [ "biliup/web/public/**/*" ] +#include = [ "biliup/web/public/**/*" ] #data = "biliup/web/public" python-packages = ["biliup"] manifest-path = "crates/stream-gears/Cargo.toml"