vvbbnn00 / WARP-Clash-API

该项目可以让你通过订阅的方式使用Cloudflare WARP+,自动获取流量。This project enables you to use Cloudflare WARP+ through subscription, automatically acquiring traffic.
GNU General Public License v3.0
8.45k stars 1.16k forks source link

按照说明用docker安装了之后,无法成功运行,帮忙看看是什么原因。 #47

Closed sarsmark-git closed 7 months ago

sarsmark-git commented 7 months ago

log的内容为:

FileNotFoundError: [Errno 2] No such file or directory: './config/cf-config.json' /usr/local/lib/python3.11/site-packages/tzlocal/unix.py:193: UserWarning: Can not find any timezone configuration, defaulting to UTC. warnings.warn("Can not find any timezone configuration, defaulting to UTC.") 2024-02-22 08:08:22,353 - INFO - Start scheduler Traceback (most recent call last): File "/app/app.py", line 82, in main() File "/app/app.py", line 54, in main from services.web_service import createApp File "/app/services/web_service.py", line 6, in from services.subscription import generateClashSubFile, generateWireguardSubFile, generateSurgeSubFile File "/app/services/subscription.py", line 18, in CF_CONFIG = json.load(open("./config/cf-config.json", "r", encoding="utf8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './config/cf-config.json'

sarsmark-git commented 7 months ago

另外docker有没有通过cli安装,或者用docker-compose安装(不需要手动编译那种)的方式。谢谢。

vvbbnn00 commented 7 months ago

您可以使用下面的docker-compose文件来进行部署(记得预先在部署的文件夹内创建accountlogs子文件夹)

version: "3.8"
services:
  warp-clash:
    image: vvbbnn00/warp-clash-api:latest
    ports:
      - "21001:3000"
    env_file:
      - .env.local
    volumes:
      - ./account:/app/account
      - ./logs:/app/logs
sarsmark-git commented 7 months ago

您可以使用下面的docker-compose文件来进行部署(记得预先在部署的文件夹内创建accountlogs子文件夹)

version: "3.8"
services:
  warp-clash:
    image: vvbbnn00/warp-clash-api:latest
    ports:
      - "21001:3000"
    env_file:
      - .env.local
    volumes:
      - ./account:/app/account
      - ./logs:/app/logs

感谢,我修改了一下成功。谢谢