Compare commits

..

2 commits
v1 ... main

Author SHA1 Message Date
vndangkhoa
105381b55d Fix Synology Docker network overlapping issue
Some checks failed
CodeQL / Analyze (push) Failing after 0s
Publish Docker image / main (push) Failing after 0s
Translate README / build (push) Failing after 0s
2026-02-20 20:51:50 +07:00
vndangkhoa
0eeeb58738 Fix deployment script and Dockerfile
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Publish Docker image / main (push) Waiting to run
Translate README / build (push) Waiting to run
2026-02-20 20:44:04 +07:00
3 changed files with 10 additions and 14 deletions

View file

@ -19,11 +19,8 @@ RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ -U pip \
# 安装依赖 # 安装依赖
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# 确保启动脚本可执行
RUN chmod +x start.sh
# 暴露端口 # 暴露端口
EXPOSE 8456 EXPOSE 8456
# 设置容器启动命令 # 设置容器启动命令
CMD ["./start.sh"] CMD ["python", "start.py"]

View file

@ -25,13 +25,13 @@ param (
[Switch]$Save [Switch]$Save
) )
$ImageName = "douyin_tiktok_download_api" $ImageName = "kv-tiktok-download"
# Update this with your actual registry if you use one, e.g., git.khoavo.myds.me/vndangkhoa/douyin-api # Update this with your actual registry if you use one
$Registry = "git.khoavo.myds.me/vndangkhoa/douyin-api" $Registry = "git.khoavo.myds.me/vndangkhoa"
$Tag = "latest" $Tag = "v1"
Write-Host "Building Docker image..." -ForegroundColor Cyan Write-Host "Building Docker image..." -ForegroundColor Cyan
docker-compose build docker build -t ${Registry}/${ImageName}:${Tag} .
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed!" Write-Error "Build failed!"
@ -42,17 +42,15 @@ Write-Host "Build successful!" -ForegroundColor Green
if ($Save) { if ($Save) {
Write-Host "Saving image to ${ImageName}.tar..." -ForegroundColor Cyan Write-Host "Saving image to ${ImageName}.tar..." -ForegroundColor Cyan
docker save -o ${ImageName}.tar ${ImageName}:${Tag} docker save -o ${ImageName}.tar ${Registry}/${ImageName}:${Tag}
Write-Host "Image saved to ${PWD}\${ImageName}.tar" -ForegroundColor Green Write-Host "Image saved to ${PWD}\${ImageName}.tar" -ForegroundColor Green
Write-Host "You can now upload this file to your Synology NAS and load it via Docker." Write-Host "You can now upload this file to your Synology NAS and load it via Docker."
} }
if ($Push) { if ($Push) {
$RemoteImage = "${Registry}:${Tag}" $RemoteImage = "${Registry}/${ImageName}:${Tag}"
Write-Host "Tagging image as ${RemoteImage}..." -ForegroundColor Cyan
docker tag ${ImageName}:${Tag} ${RemoteImage}
Write-Host "Pushing image to ${Registry}..." -ForegroundColor Cyan Write-Host "Pushing image to ${RemoteImage}..." -ForegroundColor Cyan
docker push ${RemoteImage} docker push ${RemoteImage}
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {

View file

@ -5,6 +5,7 @@ services:
image: git.khoavo.myds.me/vndangkhoa/kv-tiktok-download:v1 image: git.khoavo.myds.me/vndangkhoa/kv-tiktok-download:v1
container_name: douyin_tiktok_download_api container_name: douyin_tiktok_download_api
restart: always restart: always
network_mode: bridge
# Use bridge mode with explicit port mapping for better NAS compatibility # Use bridge mode with explicit port mapping for better NAS compatibility
ports: ports: