From bf251b588ca13c539c8cf77c6c3d0988ac433125 Mon Sep 17 00:00:00 2001 From: 17_bzhzq <2419254437@qq.com> Date: Tue, 30 Aug 2022 09:57:51 +0800 Subject: [PATCH] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker启动方式建议这样,简洁 --- README.md | 48 ++++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index f108f5d..5a11101 100644 --- a/README.md +++ b/README.md @@ -377,55 +377,35 @@ http://localhost(服务器IP):2333/music?url="复制的(抖音/TikTok)口令/链 ## 💾部署(方式二 Docker) -- 安装docker(Ubuntu) +- 安装docker -```console +```yaml curl -fsSL get.docker.com -o get-docker.sh&&sh get-docker.sh &&systemctl enable docker&&systemctl start docker ``` -- 拉取docker镜像 +- 留下config.int和docker-compose.yml文件即可 +- 运行命令,让容器在后台运行 -```console -docker pull evil0ctal/douyin_tiktok_download_api +```yaml +docker compose up -d ``` -- 运行Web以及API服务的容器(可选1或2) +- 查看容器日志 ->1.映射端口 -API入口: http://localhost:2333 Web入口: http://localhost:80 -```console -# 映射容器的5000端口到本机80 -docker run -d -p 80:5000 -p 2333:2333 evil0ctal/douyin_tiktok_download_api -``` - -> 2.不映射端口 -API入口: http://localhost:2333 Web入口: http://localhost:5000 -```console -docker run -d evil0ctal/douyin_tiktok_download_api -``` - -- 查看容器ID - -```console -docker ps -``` - -- 停止容器 - -```console -docker stop [容器ID] +```yaml +docker logs -f douyin_tiktok_download_api ``` - 删除容器 -```console -docker rm --force [容器ID] +```yaml +docker rm -f douyin_tiktok_download_api ``` -- 更新镜像 +- 更新 -```console -sudo docker pull evil0ctal/douyin_tiktok_download_api:latest +```yaml +docker compose pull && docker compose down && docker compose up -d ``` ## 🎉截图