diff --git a/Dockerfile b/Dockerfile index c1d6f47..8619708 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 chmod +x start.sh - # 暴露端口 EXPOSE 8456 # 设置容器启动命令 -CMD ["./start.sh"] +CMD ["python", "start.py"] diff --git a/deploy.ps1 b/deploy.ps1 index 799d253..801258b 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -25,13 +25,13 @@ param ( [Switch]$Save ) -$ImageName = "douyin_tiktok_download_api" -# Update this with your actual registry if you use one, e.g., git.khoavo.myds.me/vndangkhoa/douyin-api -$Registry = "git.khoavo.myds.me/vndangkhoa/douyin-api" -$Tag = "latest" +$ImageName = "kv-tiktok-download" +# Update this with your actual registry if you use one +$Registry = "git.khoavo.myds.me/vndangkhoa" +$Tag = "v1" Write-Host "Building Docker image..." -ForegroundColor Cyan -docker-compose build +docker build -t ${Registry}/${ImageName}:${Tag} . if ($LASTEXITCODE -ne 0) { Write-Error "Build failed!" @@ -42,17 +42,15 @@ Write-Host "Build successful!" -ForegroundColor Green if ($Save) { 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 "You can now upload this file to your Synology NAS and load it via Docker." } if ($Push) { - $RemoteImage = "${Registry}:${Tag}" - Write-Host "Tagging image as ${RemoteImage}..." -ForegroundColor Cyan - docker tag ${ImageName}:${Tag} ${RemoteImage} + $RemoteImage = "${Registry}/${ImageName}:${Tag}" - Write-Host "Pushing image to ${Registry}..." -ForegroundColor Cyan + Write-Host "Pushing image to ${RemoteImage}..." -ForegroundColor Cyan docker push ${RemoteImage} if ($LASTEXITCODE -ne 0) {