feat: package docker deployment and publish flow

This commit is contained in:
theshy
2026-04-22 16:20:03 +08:00
parent 055474360e
commit 2146687dc6
178 changed files with 24318 additions and 20855 deletions

View File

@ -0,0 +1,127 @@
{
"runtime": {
"database_path": "/app/data/workspace/biliup_next.db",
"control_token": "",
"log_level": "INFO"
},
"paths": {
"stage_dir": "/app/data/workspace/stage",
"backup_dir": "/app/data/workspace/backup",
"session_dir": "/app/data/workspace/session",
"cookies_file": "/app/runtime/cookies.json",
"upload_config_file": "/app/runtime/upload_config.json"
},
"scheduler": {
"candidate_scan_limit": 500,
"max_tasks_per_cycle": 50,
"prioritize_retry_due": true,
"oldest_first": true,
"status_priority": [
"failed_retryable",
"created",
"transcribed",
"songs_detected",
"split_done",
"published",
"commented",
"collection_synced"
]
},
"ingest": {
"provider": "local_file",
"min_duration_seconds": 900,
"ffprobe_bin": "ffprobe",
"yt_dlp_cmd": "yt-dlp",
"yt_dlp_format": "",
"allowed_extensions": [
".mp4",
".flv",
".mkv",
".mov"
],
"stage_min_free_space_mb": 1024,
"stability_wait_seconds": 30,
"session_gap_minutes": 60,
"meta_sidecar_enabled": true,
"meta_sidecar_suffix": ".meta.json"
},
"transcribe": {
"provider": "groq",
"groq_api_key": "",
"groq_api_keys": [],
"ffmpeg_bin": "ffmpeg",
"max_file_size_mb": 12,
"request_timeout_seconds": 180,
"request_max_retries": 1,
"request_retry_backoff_seconds": 30,
"serialize_groq_requests": true,
"retry_count": 3,
"retry_backoff_seconds": 300,
"retry_schedule_minutes": [
5,
10,
15
]
},
"song_detect": {
"provider": "codex",
"codex_cmd": "codex",
"qwen_cmd": "qwen",
"poll_interval_seconds": 2,
"retry_count": 3,
"retry_backoff_seconds": 300,
"retry_schedule_minutes": [
5,
10,
15
]
},
"split": {
"provider": "ffmpeg_copy",
"ffmpeg_bin": "ffmpeg",
"poll_interval_seconds": 2,
"min_free_space_mb": 2048
},
"publish": {
"provider": "biliup_cli",
"biliup_path": "/app/runtime/biliup",
"cookie_file": "/app/runtime/cookies.json",
"retry_count": 5,
"retry_schedule_minutes": [
15,
5,
5,
5,
5
],
"retry_backoff_seconds": 300,
"command_timeout_seconds": 1800,
"rate_limit_retry_schedule_minutes": [
15,
30,
60
]
},
"comment": {
"provider": "bilibili_top_comment",
"enabled": true,
"max_retries": 5,
"base_delay_seconds": 180,
"poll_interval_seconds": 10,
"post_split_comment": true,
"post_full_video_timeline_comment": true
},
"collection": {
"provider": "bilibili_collection",
"enabled": true,
"season_id_a": 7196643,
"season_id_b": 7196624,
"allow_fuzzy_full_video_match": false,
"append_collection_a_new_to_end": true,
"append_collection_b_new_to_end": true
},
"cleanup": {
"delete_source_video_after_collection_synced": false,
"delete_split_videos_after_collection_synced": false
}
}

View File

@ -1,15 +1,15 @@
{
"runtime": {
"database_path": "data/workspace/biliup_next.db",
"database_path": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/data/workspace/biliup_next.db",
"control_token": "",
"log_level": "INFO"
},
"paths": {
"stage_dir": "data/workspace/stage",
"backup_dir": "data/workspace/backup",
"session_dir": "data/workspace/session",
"cookies_file": "runtime/cookies.json",
"upload_config_file": "runtime/upload_config.json"
"stage_dir": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/data/workspace/stage",
"backup_dir": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/data/workspace/backup",
"session_dir": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/data/workspace/session",
"cookies_file": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/runtime/cookies.json",
"upload_config_file": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/runtime/upload_config.json"
},
"scheduler": {
"candidate_scan_limit": 500,
@ -31,7 +31,7 @@
"provider": "local_file",
"min_duration_seconds": 900,
"ffprobe_bin": "ffprobe",
"yt_dlp_cmd": "yt-dlp",
"yt_dlp_cmd": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/.venv/bin/yt-dlp",
"yt_dlp_format": "",
"allowed_extensions": [
".mp4",
@ -47,15 +47,34 @@
},
"transcribe": {
"provider": "groq",
"groq_api_key": "",
"groq_api_key": "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",
"groq_api_keys": [],
"ffmpeg_bin": "ffmpeg",
"max_file_size_mb": 23
"max_file_size_mb": 12,
"request_timeout_seconds": 180,
"request_max_retries": 1,
"request_retry_backoff_seconds": 30,
"serialize_groq_requests": true,
"retry_count": 3,
"retry_backoff_seconds": 300,
"retry_schedule_minutes": [
5,
10,
15
]
},
"song_detect": {
"provider": "qwen_cli",
"provider": "codex",
"codex_cmd": "codex",
"qwen_cmd": "qwen",
"poll_interval_seconds": 2
"poll_interval_seconds": 2,
"retry_count": 3,
"retry_backoff_seconds": 300,
"retry_schedule_minutes": [
5,
10,
15
]
},
"split": {
"provider": "ffmpeg_copy",
@ -65,8 +84,8 @@
},
"publish": {
"provider": "biliup_cli",
"biliup_path": "runtime/biliup",
"cookie_file": "runtime/cookies.json",
"biliup_path": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/runtime/biliup",
"cookie_file": "/mnt/f/Codecases/2026-04-14_biliup-next/biliup-next/runtime/cookies.json",
"retry_count": 5,
"retry_schedule_minutes": [
15,
@ -78,9 +97,9 @@
"retry_backoff_seconds": 300,
"command_timeout_seconds": 1800,
"rate_limit_retry_schedule_minutes": [
15,
30,
60,
120
60
]
},
"comment": {
@ -95,8 +114,8 @@
"collection": {
"provider": "bilibili_collection",
"enabled": true,
"season_id_a": 0,
"season_id_b": 0,
"season_id_a": 7196643,
"season_id_b": 7196624,
"allow_fuzzy_full_video_match": false,
"append_collection_a_new_to_end": true,
"append_collection_b_new_to_end": true

View File

@ -229,6 +229,16 @@
"description": "用于调用 Groq 转录 API。",
"sensitive": true
},
"groq_api_keys": {
"type": "array",
"default": [],
"title": "Groq API Keys",
"ui_order": 12,
"ui_widget": "secret_list",
"items": { "type": "string" },
"description": "可选 Groq API Key 池。遇到单个 key 限流时会自动切换下一个 key为空时使用 groq_api_key。",
"sensitive": true
},
"ffmpeg_bin": {
"type": "string",
"default": "ffmpeg",
@ -238,10 +248,66 @@
},
"max_file_size_mb": {
"type": "integer",
"default": 23,
"default": 12,
"title": "Max File Size MB",
"ui_order": 40,
"minimum": 1
"minimum": 1,
"description": "Groq 音频分片目标上限。实际切分会额外保留安全余量,避免贴近上传限制。"
},
"request_timeout_seconds": {
"type": "integer",
"default": 180,
"title": "Request Timeout Seconds",
"ui_order": 50,
"minimum": 1,
"description": "单个 Groq 转录请求的超时时间。"
},
"request_max_retries": {
"type": "integer",
"default": 1,
"title": "Request Max Retries",
"ui_order": 60,
"minimum": 0,
"description": "单个音频分片在超时、限流或连接错误时的请求级重试次数。"
},
"request_retry_backoff_seconds": {
"type": "integer",
"default": 30,
"title": "Request Retry Backoff Seconds",
"ui_order": 70,
"minimum": 0,
"description": "Groq 请求级重试之间的等待时间。"
},
"serialize_groq_requests": {
"type": "boolean",
"default": true,
"title": "Serialize Groq Requests",
"ui_order": 75,
"description": "是否串行化 Groq 分片上传请求,避免多个 worker 或多个任务同时上传导致超时。"
},
"retry_count": {
"type": "integer",
"default": 3,
"title": "Task Retry Count",
"ui_order": 80,
"minimum": 0,
"description": "transcribe 步骤允许的任务级失败重试次数。"
},
"retry_backoff_seconds": {
"type": "integer",
"default": 300,
"title": "Task Retry Backoff Seconds",
"ui_order": 90,
"minimum": 0,
"description": "未配置 retry_schedule_minutes 时transcribe 任务级重试的等待时间。"
},
"retry_schedule_minutes": {
"type": "array",
"default": [5, 10, 15],
"title": "Task Retry Schedule Minutes",
"ui_order": 100,
"items": { "type": "integer", "minimum": 0 },
"description": "transcribe 任务级失败后的自动重试等待时间。"
}
},
"song_detect": {
@ -275,6 +341,30 @@
"title": "Poll Interval Seconds",
"ui_order": 30,
"minimum": 1
},
"retry_count": {
"type": "integer",
"default": 3,
"title": "Task Retry Count",
"ui_order": 40,
"minimum": 0,
"description": "song_detect 步骤允许的任务级失败重试次数。认证失败会直接进入人工失败,不会重试。"
},
"retry_backoff_seconds": {
"type": "integer",
"default": 300,
"title": "Task Retry Backoff Seconds",
"ui_order": 50,
"minimum": 0,
"description": "未配置 retry_schedule_minutes 时song_detect 任务级重试的等待时间。"
},
"retry_schedule_minutes": {
"type": "array",
"default": [5, 10, 15],
"title": "Task Retry Schedule Minutes",
"ui_order": 60,
"items": { "type": "integer", "minimum": 0 },
"description": "song_detect 任务级失败后的自动重试等待时间。"
}
},
"split": {
@ -375,9 +465,9 @@
"rate_limit_retry_schedule_minutes": {
"type": "array",
"default": [
15,
30,
60,
120
60
],
"title": "Rate Limit Retry Schedule Minutes",
"ui_order": 70,

View File

@ -1,69 +1,70 @@
{
"runtime": {
"database_path": "data/workspace/biliup_next.db",
"control_token": "",
"log_level": "INFO"
},
"paths": {
"stage_dir": "data/workspace/stage",
"backup_dir": "data/workspace/backup",
"session_dir": "data/workspace/session",
"cookies_file": "runtime/cookies.json",
"upload_config_file": "runtime/upload_config.json"
},
"ingest": {
"provider": "local_file",
"min_duration_seconds": 900,
"ffprobe_bin": "ffprobe",
"yt_dlp_cmd": "yt-dlp",
"yt_dlp_format": "",
"allowed_extensions": [".mp4", ".flv", ".mkv", ".mov"],
"stage_min_free_space_mb": 2048,
"stability_wait_seconds": 30,
"session_gap_minutes": 60,
"meta_sidecar_enabled": true,
"meta_sidecar_suffix": ".meta.json"
},
"transcribe": {
{
"runtime": {
"database_path": "data/workspace/biliup_next.db",
"control_token": "",
"log_level": "INFO"
},
"paths": {
"stage_dir": "data/workspace/stage",
"backup_dir": "data/workspace/backup",
"session_dir": "data/workspace/session",
"cookies_file": "runtime/cookies.json",
"upload_config_file": "runtime/upload_config.json"
},
"ingest": {
"provider": "local_file",
"min_duration_seconds": 900,
"ffprobe_bin": "ffprobe",
"yt_dlp_cmd": "yt-dlp",
"yt_dlp_format": "",
"allowed_extensions": [".mp4", ".flv", ".mkv", ".mov"],
"stage_min_free_space_mb": 2048,
"stability_wait_seconds": 30,
"session_gap_minutes": 60,
"meta_sidecar_enabled": true,
"meta_sidecar_suffix": ".meta.json"
},
"transcribe": {
"provider": "groq",
"groq_api_key": "",
"groq_api_keys": [],
"ffmpeg_bin": "ffmpeg",
"max_file_size_mb": 23
},
"song_detect": {
"provider": "codex",
"codex_cmd": "codex",
"qwen_cmd": "qwen",
"poll_interval_seconds": 2
},
"split": {
"provider": "ffmpeg_copy",
"ffmpeg_bin": "ffmpeg",
"poll_interval_seconds": 2
},
"publish": {
"provider": "biliup_cli",
"biliup_path": "runtime/biliup",
"cookie_file": "runtime/cookies.json",
"retry_count": 5,
"retry_backoff_seconds": 300,
"command_timeout_seconds": 1800,
"rate_limit_retry_schedule_minutes": [30, 60, 120]
},
"comment": {
"provider": "bilibili_top_comment",
"enabled": true,
"max_retries": 5,
"base_delay_seconds": 180,
"poll_interval_seconds": 10
},
"collection": {
"provider": "bilibili_collection",
"enabled": true,
"season_id_a": 7196643,
"season_id_b": 7196624,
"allow_fuzzy_full_video_match": false,
"append_collection_a_new_to_end": true,
"append_collection_b_new_to_end": true
}
}
"max_file_size_mb": 23
},
"song_detect": {
"provider": "codex",
"codex_cmd": "codex",
"qwen_cmd": "qwen",
"poll_interval_seconds": 2
},
"split": {
"provider": "ffmpeg_copy",
"ffmpeg_bin": "ffmpeg",
"poll_interval_seconds": 2
},
"publish": {
"provider": "biliup_cli",
"biliup_path": "runtime/biliup",
"cookie_file": "runtime/cookies.json",
"retry_count": 5,
"retry_backoff_seconds": 300,
"command_timeout_seconds": 1800,
"rate_limit_retry_schedule_minutes": [30, 60, 120]
},
"comment": {
"provider": "bilibili_top_comment",
"enabled": true,
"max_retries": 5,
"base_delay_seconds": 180,
"poll_interval_seconds": 10
},
"collection": {
"provider": "bilibili_collection",
"enabled": true,
"season_id_a": 7196643,
"season_id_b": 7196624,
"allow_fuzzy_full_video_match": false,
"append_collection_a_new_to_end": true,
"append_collection_b_new_to_end": true
}
}