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

This commit is contained in:
vndangkhoa 2026-02-20 20:44:04 +07:00
parent c9aa05f333
commit 0eeeb58738
2 changed files with 9 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 chmod +x start.sh
# 暴露端口
EXPOSE 8456
# 设置容器启动命令
CMD ["./start.sh"]
CMD ["python", "start.py"]

View file

@ -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) {