Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
105381b55d | ||
|
|
0eeeb58738 |
3 changed files with 10 additions and 14 deletions
|
|
@ -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"]
|
||||
|
|
|
|||
18
deploy.ps1
18
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) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ services:
|
|||
image: git.khoavo.myds.me/vndangkhoa/kv-tiktok-download:v1
|
||||
container_name: douyin_tiktok_download_api
|
||||
restart: always
|
||||
network_mode: bridge
|
||||
|
||||
# Use bridge mode with explicit port mapping for better NAS compatibility
|
||||
ports:
|
||||
|
|
|
|||
Loading…
Reference in a new issue