version: '3.4' services: douyin: build: context: . dockerfile: Dockerfile restart: always container_name: douyin image: registry.cn-hangzhou.aliyuncs.com/yinzhou_docker_hub/douyin:yz1 #环境变量需要替换成自己的 environment: DASHSCOPE_API_KEY: 指定阿里百炼的apikey ports: - "1314:1314" depends_on: - douyin_tiktok_download_api douyin_tiktok_download_api: # 服务名称 image: registry.cn-hangzhou.aliyuncs.com/yinzhou_docker_hub/douyin_tiktok_download_api # 使用的 Docker 镜像 container_name: douyin_tiktok_download_api # 容器名称 hostname: douyin_tiktok_download_api restart: always # 容器退出后总是重启 volumes: # 挂载卷配置 - ./douyin_tiktok_download_api/douyin_web/config.yaml:/app/crawlers/douyin/web/config.yaml - ./douyin_tiktok_download_api/tiktok_web/config.yaml:/app/crawlers/tiktok/web/config.yaml - ./douyin_tiktok_download_api/tiktok_app/config.yaml:/app/crawlers/tiktok/app/config.yaml environment: # 环境变量配置 TZ: Asia/Shanghai # 设置时区为亚洲/上海 # 需要调试可以打开80端口 ports: - 9579:80 # docker-compose up --build