Compare commits

..

No commits in common. "main" and "v1" have entirely different histories.
main ... v1

3 changed files with 14 additions and 10 deletions

View file

@ -19,8 +19,11 @@ 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 ["python", "start.py"] CMD ["./start.sh"]

View file

@ -25,13 +25,13 @@ param (
[Switch]$Save [Switch]$Save
) )
$ImageName = "kv-tiktok-download" $ImageName = "douyin_tiktok_download_api"
# Update this with your actual registry if you use one # 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" $Registry = "git.khoavo.myds.me/vndangkhoa/douyin-api"
$Tag = "v1" $Tag = "latest"
Write-Host "Building Docker image..." -ForegroundColor Cyan Write-Host "Building Docker image..." -ForegroundColor Cyan
docker build -t ${Registry}/${ImageName}:${Tag} . docker-compose build
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed!" Write-Error "Build failed!"
@ -42,15 +42,17 @@ 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 ${Registry}/${ImageName}:${Tag} docker save -o ${ImageName}.tar ${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}/${ImageName}:${Tag}" $RemoteImage = "${Registry}:${Tag}"
Write-Host "Tagging image as ${RemoteImage}..." -ForegroundColor Cyan
docker tag ${ImageName}:${Tag} ${RemoteImage}
Write-Host "Pushing image to ${RemoteImage}..." -ForegroundColor Cyan Write-Host "Pushing image to ${Registry}..." -ForegroundColor Cyan
docker push ${RemoteImage} docker push ${RemoteImage}
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {

View file

@ -5,7 +5,6 @@ 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: