七弈智慧• 工作室

lichess-docker说明

2025-05-18 18:03:53 阅读(221)

lila-docker

使用 Docker Compose 的 Lichess 开发环境,适用于在 Mac、Linux 或 Windows(通过 WSL)上进行开发。

在您的本地机器上运行的唯一要求是 git 和 Docker Desktop。所有其他依赖项(Scala、MongoDB、Node.js 等)都安装并在 Docker 容器中运行。

在 Gitpod 中运行

作为在本地机器上运行的替代方案,您可以使用 Gitpod(一个免费的、在线的、类似于 VS Code 的 IDE)进行贡献。只需单击一下,它将启动一个工作区并自动执行以下操作:

  • 克隆必要的 Lichess 仓库
  • 安装所有依赖项
  • 用测试数据填充您的数据库
  • 启动您的开发站点

点击此处创建工作区:

 

指令

  1. 安装 Docker Desktop 并确保它正在运行

  2. 克隆此仓库:

    git clone https://github.com/lichess-org/lila-docker
  3. 启动服务

    cd lila-docker
    ./lila-docker start

    启动新服务可能需要 5-10 分钟。一些服务会在其他服务之前启动,您可能会在所有服务上线之前在日志中看到错误。

    Lila 将是最后一个完成的服务,此时您可以访问 http://localhost:8080/ 来查看站点。

停止

要停止容器,以便稍后通过 ./lila-docker start 恢复:

./lila-docker stop

要移除容器:

./lila-docker down

URL

始终可用:

服务 URL
主 lila 实例 http://localhost:8080/

根据您启动的可选服务:

服务 URL
Mongodb 管理器 http://localhost:8081/
电子邮件收件箱 http://localhost:8025/
lila-gif http://localhost:6175/image.gif?fen=4k3/6KP/8/8/8/8/7p/8
Picfit http://localhost:3001/healthcheck
Elasticsearch 管理器 http://localhost:8092/
API 文档 http://localhost:8089/
Chessground http://localhost:8090/demo.html
PGN 查看器 http://localhost:8091/
InfluxDB http://localhost:8086/ (admin/password)

使用

Scala 开发:

在对任何 Scala 代码进行更改后,重新启动 lila:

./lila-docker lila restart

UI (JS/CSS) 开发:

要监视 Typescript/SCSS 更改并自动重新编译:

./lila-docker ui

更新路由

如果您编辑了 conf/routes 文件,则需要更新路由缓存。

docker compose exec lila ./lila playRoutes

添加翻译键:

修改 translation/source/*.xml 文件后,运行:

docker compose run --rm ui /lila/bin/trans-dump

代码格式化:

./lila-docker format

可选:使数据库持久化

docker compose cp mongodb:/data/db ./database

然后在 docker-compose.yml 中将 - ./database:/data/db 添加到 mongodb 卷

Berserk(Python 库):

安装 Berserk 的开发版本,并针对您的本地开发站点运行一个示例脚本:

docker compose run --rm -w /berserk python \
    bash -c "pip install -e . && python /scripts/berserk-example.py"

Scala Metals(IDE 助手):

  1. 在 VS Code 中打开此 lila-docker 项目并安装 Dev Containers 扩展
  2. Cmd+Shift+P > "Dev Containers: Rebuild and Reopen in Container"
  3. 一个新的 VS Code 窗口将打开,连接到容器而不是您的主机机器
  4. 文件 > 打开文件夹 > "/workspaces/lila-docker/repos/lila"(或您想要工作的任何 Scala 项目)
  5. 安装 + 启用 Scala Metals 扩展(Cmd+Shift+X > "Scala (Metals)")
  6. Cmd+Shift+P > "Metals: Import build"

一旦构建被导入,当您打开 Scala 文件时,您应该拥有代码完成、跳转到定义等功能。

Scalachess:

如果您正在修改 Scalachess 库,您可以让 lila 使用它而不是发布到 Maven 的版本:

  1. 更新 scalachess 仓库中的 build.sbt 文件:

    -  ThisBuild / version           := "15.6.7"
    +  ThisBuild / version           := "my-test-1"  # 给它一个自定义版本
  2. 更新 lila 仓库中的 Dependencies.scala 文件:

    -  val chess = "org.lichess" %% "scalachess" % "15.6.7"
    +  val chess = "org.lichess" %% "scalachess" % "my-test-1"
  3. 发布本地 scalachess 更改并重新启动 lila:

    docker compose exec -w /scalachess lila sbt publishLocal
    docker compose restart lila

其他 Scalachess 命令:

## 格式化
docker compose run --rm -w /scalachess --entrypoint="sbt check" lila
docker compose run --rm -w /scalachess --entrypoint="sbt prepare" lila

## 编译
docker compose run --rm -w /scalachess --entrypoint="sbt compile" lila

## 测试
docker compose run --rm -w /scalachess --entrypoint="sbt testKit/test" lila

## 打包
docker compose run --rm -w /scalachess --entrypoint="sbt package" lila

Dartchess:

## 运行格式化程序
docker compose run --rm -w /dartchess mobile dart format .

## 分析
docker compose run --rm -w /dartchess mobile bash -c "dart pub get && dart analyze"

## 运行测试
docker compose run --rm -w /dartchess mobile bash -c "dart pub get && dart test -x full_perft"

本地开发 Chessground

默认情况下,您的本地 lila 实例将使用发布到 npm 的 chessground 版本。如果您想要修改该库并看到它们在您的本地 lila 实例中的反映,您可以执行以下操作:

  1. 更新 lila 仓库中的 package.json

    "dependencies": {
    -  "chessground": "^8.3.11",
    +  "chessground": "link:/chessground",
    }
  2. 以监视模式启动 chessground 编译器:

    docker compose run --rm -w /chessground ui bash -c "pnpm install && pnpm run compile --watch"
  3. 以监视模式启动 lila ui 构建:

    ./lila-docker ui

然后您可以在 http://localhost:8090/demo.html 查看更新后的 chessground 演示,并在刷新 lila 时,它将使用 chessground 的本地副本。

本地开发 PGN 查看器

在进行更改后重新编译 PGN 查看器:

docker compose run --rm -w /pgn-viewer ui bash -c "pnpm run sass-dev && pnpm run bundle-dev"

在 PGN 查看器演示页面上查看更改:http://localhost:8091/

InfluxDB 监控

要查看 InfluxDB 监控仪表板,请启动您的环境并启用 Monitoring 服务,然后访问 http://localhost:8086/ (admin/password)

您还可以通过运行以下命令查看记录的所有指标:

curl --get http://localhost:8086/query \
    --header "Authorization: Token secret" \
    --data-urlencode "db=kamon"  \
    --data-urlencode "q=show measurements;"

移动设备

  1. 在您的 Android 手机上:

    1. 将手机连接到与主机相同的 Wi-Fi 网络
    2. 启用开发者模式
    3. 在开发者选项中,启用无线调试并进入其菜单
  2. 在您的主机机器上:

    1. 确保 lila-docker 服务正在运行,并已启动 Mobile 可选服务

    2. 配置 lila 以使用主机的 IP 地址或主机名而不是 localhost

      ./lila-docker hostname
      • 然后验证您的手机可以访问 http://[您的选择]:8080 上的站点
    3. 连接到您的手机

      ./lila-docker mobile
    4. 在容器上获取 shell:

      docker compose exec -it mobile bash
      
      # 验证您的手机已列出
      adb devices
    5. 安装应用程序依赖项:

      flutter pub get
      dart run build_runner build
    6. 运行应用程序:

      flutter run -v \
          --dart-define LICHESS_HOST=$LILA_URL \
          --dart-define LICHESS_WS_HOST=$LILA_URL
      • 无需替换。容器上已经设置了 $LILA_URL 环境变量。
      • 第一次运行时,可能需要一些时间

接口页面--全局数据:

site-> {"id":1,"name":"七弈智慧","domain":"doc.7yi.link","email":"13346163791@qq.com","wx":null,"icp":"浙ICP备2023022652号-1","code":"","json":{"siteSubtitle":"• 工作室"},"title":"七弈国象-连接七弈 智慧人生","keywords":"国际象棋,棋谱,pgn,","description":"国际象棋站","createdAt":null,"updatedAt":"2025-04-14T01:07:55.000Z","template":null,"appid":null,"secret":null}

111-->• 工作室

nav-> [{"id":13,"pid":0,"name":"日常工作杂记","pinyin":"richanggongzuozaji","path":"/richanggongzuozaji","sort":4,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0","children":[{"id":14,"pid":13,"name":"前端","pinyin":"qianduan","path":"/richanggongzuozaji/qianduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":15,"pid":13,"name":"后端","pinyin":"houduan","path":"/cmsgaijin/houduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/kaifariji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":17,"pid":13,"name":"工作计划","pinyin":"gongzuojihua","path":"/cmsgaijin/gongzuojihua","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":22,"pid":13,"name":"炒股养棋","pinyin":"chaoguyangqi","path":"/chaoguyangqi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":23,"pid":13,"name":"cx13","pinyin":"cx13","path":"/kaifariji/cx13","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":24,"pid":13,"name":"时限学堂","pinyin":"shixianxuetang","path":"/richanggongzuozaji/shixianxuetang","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":25,"pid":13,"name":"运营","pinyin":"yunying","path":"/richanggongzuozaji/yunying","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]},{"id":18,"pid":0,"name":"国象练习","pinyin":"guoxianglianxi","path":"/guoxianglianxi","sort":3,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":19,"pid":0,"name":"信息公布","pinyin":"xinxigongbu","path":"/xinxigongbu","sort":6,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0","children":[{"id":20,"pid":19,"name":"业界消息","pinyin":"yejiexiaoxi","path":"/qiyiguoxiang/yejiexiaoxi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":21,"pid":19,"name":"七弈动态","pinyin":"qiyidongtai","path":"/xinxigongbu/qiyidongtai","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]}]

category-> [{"id":13,"pid":0,"name":"日常工作杂记","pinyin":"richanggongzuozaji","path":"/richanggongzuozaji","sort":4,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0","children":[{"id":14,"pid":13,"name":"前端","pinyin":"qianduan","path":"/richanggongzuozaji/qianduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":15,"pid":13,"name":"后端","pinyin":"houduan","path":"/cmsgaijin/houduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/kaifariji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":17,"pid":13,"name":"工作计划","pinyin":"gongzuojihua","path":"/cmsgaijin/gongzuojihua","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":22,"pid":13,"name":"炒股养棋","pinyin":"chaoguyangqi","path":"/chaoguyangqi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":23,"pid":13,"name":"cx13","pinyin":"cx13","path":"/kaifariji/cx13","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":24,"pid":13,"name":"时限学堂","pinyin":"shixianxuetang","path":"/richanggongzuozaji/shixianxuetang","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":25,"pid":13,"name":"运营","pinyin":"yunying","path":"/richanggongzuozaji/yunying","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]},{"id":14,"pid":13,"name":"前端","pinyin":"qianduan","path":"/richanggongzuozaji/qianduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":15,"pid":13,"name":"后端","pinyin":"houduan","path":"/cmsgaijin/houduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/kaifariji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":17,"pid":13,"name":"工作计划","pinyin":"gongzuojihua","path":"/cmsgaijin/gongzuojihua","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":18,"pid":0,"name":"国象练习","pinyin":"guoxianglianxi","path":"/guoxianglianxi","sort":3,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":19,"pid":0,"name":"信息公布","pinyin":"xinxigongbu","path":"/xinxigongbu","sort":6,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0","children":[{"id":20,"pid":19,"name":"业界消息","pinyin":"yejiexiaoxi","path":"/qiyiguoxiang/yejiexiaoxi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":21,"pid":19,"name":"七弈动态","pinyin":"qiyidongtai","path":"/xinxigongbu/qiyidongtai","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]},{"id":20,"pid":19,"name":"业界消息","pinyin":"yejiexiaoxi","path":"/qiyiguoxiang/yejiexiaoxi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":21,"pid":19,"name":"七弈动态","pinyin":"qiyidongtai","path":"/xinxigongbu/qiyidongtai","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":22,"pid":13,"name":"炒股养棋","pinyin":"chaoguyangqi","path":"/chaoguyangqi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":23,"pid":13,"name":"cx13","pinyin":"cx13","path":"/kaifariji/cx13","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":24,"pid":13,"name":"时限学堂","pinyin":"shixianxuetang","path":"/richanggongzuozaji/shixianxuetang","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":25,"pid":13,"name":"运营","pinyin":"yunying","path":"/richanggongzuozaji/yunying","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]

friendlink-> [{"id":1,"title":"七弈国象首页","link":"https://www.7yi.link","sort":0,"createdAt":"2023-07-22T14:59:55.000Z"}]

base_url-> /public/template/default

frag--->{"record":"<p style=\"text-align: center;\"><a href=\"http://beian.miit.gov.cn/\" target=\"_blank\" rel=\"noopener\">浙ICP备2023022652号-1</a></p>","footer-guanyu":"","footer-7yi":"","footer-chess":"","footer-fe":"","chanyue-introduce":"<p>七弈国象:专注于国际象棋开局与战术学习的网站</p>\n<ul>\n<li>国际象棋相关工具开发:<br>\n<ul>\n<li>记谱训练</li>\n<li>识谱工具</li>\n</ul>\n</li>\n<li>国象相关产品\n<ul>\n<li>记录本</li>\n</ul>\n</li>\n<li>电商网站\n<ul>\n<li>畅享一三</li>\n</ul>\n</li>\n<li>通用后台<br>\n<ul>\n<li>7Link通用后台开发系统&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>\n</ul>\n</li>\n</ul>","copyright":"<p style=\"text-align: center;\">杭州七弈智慧科技有限公司版权所有</p>","ad":"<p style=\"text-align: center;\"><a href=\"https://7yi.link/stock/chess/web-mobile/\" target=\"_blank\" rel=\"noopener\"> <img style=\"display: block; margin-left: auto; margin-right: auto; max-width: 100%; height: auto;\" src=\"/public/uploads/default/2023/09/21/1695286791855_mceu_83563456911695286788809.png.png\"> </a></p>\n<p style=\"text-align: center;\"><a href=\"https://7yi.link/stock/chess/web-mobile/\" target=\"_blank\" rel=\"noopener\">开局树学习</a></p>"}

tag--->[{"id":8,"name":"双马防御","path":"shuangmafangyu"},{"id":7,"name":"开发","path":"kaifa"},{"id":6,"name":"伦敦体系","path":"lunduntixi"},{"id":5,"name":"俄罗斯防御","path":"eluosifangyu"},{"id":1,"name":"cms","path":"cms"}]

-----------

position------>[{"id":13,"pid":0,"name":"日常工作杂记","pinyin":"richanggongzuozaji","path":"/richanggongzuozaji","sort":4,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0","children":[{"id":14,"pid":13,"name":"前端","pinyin":"qianduan","path":"/cmsgaijin/qianduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":15,"pid":13,"name":"后端","pinyin":"houduan","path":"/cmsgaijin/houduan","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/richanggongzuozaji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":17,"pid":13,"name":"工作计划","pinyin":"gongzuojihua","path":"/cmsgaijin/gongzuojihua","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":22,"pid":13,"name":"炒股养棋","pinyin":"chaoguyangqi","path":"/chaoguyangqi","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":23,"pid":13,"name":"cx13","pinyin":"cx13","path":"/kaifariji/cx13","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":24,"pid":13,"name":"时限学堂","pinyin":"shixianxuetang","path":"/richanggongzuozaji/shixianxuetang","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},{"id":25,"pid":13,"name":"运营","pinyin":"yunying","path":"/richanggongzuozaji/yunying","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]},{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/richanggongzuozaji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"}]

navSub------>{"cate":{"id":16,"pid":13,"name":"总结","pinyin":"zongjie","path":"/richanggongzuozaji/zongjie","sort":0,"target":"0","status":"0","list_view":"list.html","article_view":"article.html","seo_title":"","seo_keywords":"","seo_description":"","type":"0"},"id":16}

article------>{"id":209,"cid":16,"sub_cid":"","title":"lichess-docker说明","short_title":"","tag_id":"","attr":"","seo_title":"","seo_keywords":"","seo_description":"","source":"","author":"","description":"","img":"","content":"<h1>lila-docker</h1>\n<p>使用 Docker Compose 的 Lichess 开发环境,适用于在 Mac、Linux 或 Windows(通过 WSL)上进行开发。</p>\n<p>在您的本地机器上运行的唯一要求是 <code class=\"inlineCode___h27aF\">git</code> 和 Docker Desktop。所有其他依赖项(Scala、MongoDB、Node.js 等)都安装并在 Docker 容器中运行。</p>\n<h2>在 Gitpod 中运行</h2>\n<p>作为在本地机器上运行的替代方案,您可以使用 Gitpod(一个免费的、在线的、类似于 VS Code 的 IDE)进行贡献。只需单击一下,它将启动一个工作区并自动执行以下操作:</p>\n<ul>\n<li>克隆必要的 Lichess 仓库</li>\n<li>安装所有依赖项</li>\n<li>用测试数据填充您的数据库</li>\n<li>启动您的开发站点</li>\n</ul>\n<p>点击此处创建工作区:</p>\n<p>&nbsp;</p>\n<h2>指令</h2>\n<ol>\n<li>\n<p>安装 <a href=\"https://www.docker.com/products/docker-desktop/\" target=\"_blank\" rel=\"noopener\">Docker Desktop</a> 并确保它正在运行</p>\n</li>\n<li>\n<p>克隆此仓库:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">git</span> clone https://github.com/lichess-org/lila-docker</code></pre>\n</div>\n</li>\n<li>\n<p>启动服务</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">cd</span> lila-docker\n./lila-docker start</code></pre>\n</div>\n<p>启动新服务可能需要 5-10 分钟。一些服务会在其他服务之前启动,您可能会在所有服务上线之前在日志中看到错误。</p>\n<p>Lila 将是最后一个完成的服务,此时您可以访问 <a href=\"http://localhost:8080/\" target=\"_blank\" rel=\"noopener\">http://localhost:8080/</a> 来查看站点。</p>\n</li>\n</ol>\n<h3>停止</h3>\n<p>要停止容器,以便稍后通过 <code class=\"inlineCode___h27aF\">./lila-docker start</code> 恢复:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker stop</code></pre>\n</div>\n<p>要移除容器:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker down</code></pre>\n</div>\n<h2>URL</h2>\n<p>始终可用:</p>\n<table>\n<thead>\n<tr>\n<th>服务</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>主 lila 实例</td>\n<td><a href=\"http://localhost:8080/\" target=\"_blank\" rel=\"noopener\">http://localhost:8080/</a></td>\n</tr>\n</tbody>\n</table>\n<p>根据您启动的可选服务:</p>\n<table>\n<thead>\n<tr>\n<th>服务</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Mongodb 管理器</td>\n<td><a href=\"http://localhost:8081/\" target=\"_blank\" rel=\"noopener\">http://localhost:8081/</a></td>\n</tr>\n<tr>\n<td>电子邮件收件箱</td>\n<td><a href=\"http://localhost:8025/\" target=\"_blank\" rel=\"noopener\">http://localhost:8025/</a></td>\n</tr>\n<tr>\n<td>lila-gif</td>\n<td><a href=\"http://localhost:6175/image.gif?fen=4k3/6KP/8/8/8/8/7p/8\" target=\"_blank\" rel=\"noopener\">http://localhost:6175/image.gif?fen=4k3/6KP/8/8/8/8/7p/8</a></td>\n</tr>\n<tr>\n<td>Picfit</td>\n<td><a href=\"http://localhost:3001/healthcheck\" target=\"_blank\" rel=\"noopener\">http://localhost:3001/healthcheck</a></td>\n</tr>\n<tr>\n<td>Elasticsearch 管理器</td>\n<td><a href=\"http://localhost:8092/\" target=\"_blank\" rel=\"noopener\">http://localhost:8092/</a></td>\n</tr>\n<tr>\n<td>API 文档</td>\n<td><a href=\"http://localhost:8089/\" target=\"_blank\" rel=\"noopener\">http://localhost:8089/</a></td>\n</tr>\n<tr>\n<td>Chessground</td>\n<td><a href=\"http://localhost:8090/demo.html\" target=\"_blank\" rel=\"noopener\">http://localhost:8090/demo.html</a></td>\n</tr>\n<tr>\n<td>PGN 查看器</td>\n<td><a href=\"http://localhost:8091/\" target=\"_blank\" rel=\"noopener\">http://localhost:8091/</a></td>\n</tr>\n<tr>\n<td>InfluxDB</td>\n<td><a href=\"http://localhost:8086/\" target=\"_blank\" rel=\"noopener\">http://localhost:8086/</a>&nbsp;(admin/password)</td>\n</tr>\n</tbody>\n</table>\n<h2>使用</h2>\n<h3>Scala 开发:</h3>\n<p>在对任何 Scala 代码进行更改后,重新启动 lila:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker lila restart</code></pre>\n</div>\n<h3>UI (JS/CSS) 开发:</h3>\n<p>要监视 Typescript/SCSS 更改并自动重新编译:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker ui</code></pre>\n</div>\n<h3>更新路由</h3>\n<p>如果您编辑了 <code class=\"inlineCode___h27aF\">conf/routes</code> 文件,则需要更新路由缓存。</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose <span class=\"token\">exec</span> lila ./lila playRoutes</code></pre>\n</div>\n<h3>添加翻译键:</h3>\n<p>修改 <code class=\"inlineCode___h27aF\">translation/source/*.xml</code> 文件后,运行:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose run --rm ui /lila/bin/trans-dump</code></pre>\n</div>\n<h3>代码格式化:</h3>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker <span class=\"token\">format</span></code></pre>\n</div>\n<h3>可选:使数据库持久化</h3>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose <span class=\"token\">cp</span> mongodb:/data/db ./database</code></pre>\n</div>\n<p>然后在 <code class=\"inlineCode___h27aF\">docker-compose.yml</code> 中将 <code class=\"inlineCode___h27aF\">- ./database:/data/db</code> 添加到 mongodb 卷</p>\n<h3>Berserk(Python 库):</h3>\n<p>安装 <a href=\"https://github.com/lichess-org/berserk\" target=\"_blank\" rel=\"noopener\">Berserk</a> 的开发版本,并针对您的本地开发站点运行一个示例脚本:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose run --rm -w /berserk python <span class=\"token\">\\</span>\n <span class=\"token\">bash</span> -c <span class=\"token\">\"pip install -e . &amp;&amp; python /scripts/berserk-example.py\"</span></code></pre>\n</div>\n<h3>Scala Metals(IDE 助手):</h3>\n<ol>\n<li>在 VS Code 中打开此&nbsp;<code class=\"inlineCode___h27aF\">lila-docker</code>&nbsp;项目并安装&nbsp;<a href=\"https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers\" target=\"_blank\" rel=\"noopener\">Dev Containers 扩展</a></li>\n<li>Cmd+Shift+P &gt; \"Dev Containers: Rebuild and Reopen in Container\"</li>\n<li>一个新的 VS Code 窗口将打开,连接到容器而不是您的主机机器</li>\n<li>文件 &gt; 打开文件夹 &gt; \"/workspaces/lila-docker/repos/lila\"(或您想要工作的任何 Scala 项目)</li>\n<li>安装 + 启用 Scala Metals 扩展(Cmd+Shift+X &gt; \"Scala (Metals)\")</li>\n<li>Cmd+Shift+P &gt; \"Metals: Import build\"</li>\n</ol>\n<p>一旦构建被导入,当您打开 Scala 文件时,您应该拥有代码完成、跳转到定义等功能。</p>\n<h3>Scalachess:</h3>\n<p>如果您正在修改 Scalachess 库,您可以让 lila 使用它而不是发布到 Maven 的版本:</p>\n<ol>\n<li>\n<p>更新 scalachess 仓库中的 <code class=\"inlineCode___h27aF\">build.sbt</code> 文件:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-diff\"><span class=\"token deleted-sign prefix\">-</span><span class=\"token deleted-sign line\"> ThisBuild / version := \"15.6.7\"\n</span><span class=\"token inserted-sign prefix\">+</span><span class=\"token inserted-sign line\"> ThisBuild / version := \"my-test-1\" # 给它一个自定义版本</span></code></pre>\n</div>\n</li>\n<li>\n<p>更新 lila 仓库中的 <code class=\"inlineCode___h27aF\">Dependencies.scala</code> 文件:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-diff\"><span class=\"token deleted-sign prefix\">-</span><span class=\"token deleted-sign line\"> val chess = \"org.lichess\" %% \"scalachess\" % \"15.6.7\"\n</span><span class=\"token inserted-sign prefix\">+</span><span class=\"token inserted-sign line\"> val chess = \"org.lichess\" %% \"scalachess\" % \"my-test-1\"</span></code></pre>\n</div>\n</li>\n<li>\n<p>发布本地 scalachess 更改并重新启动 lila:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose <span class=\"token\">exec</span> -w /scalachess lila sbt publishLocal\n<span class=\"token\">docker</span> compose restart lila</code></pre>\n</div>\n</li>\n</ol>\n<p>其他 Scalachess 命令:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">## 格式化</span>\n<span class=\"token\">docker</span> compose run --rm -w /scalachess --entrypoint<span class=\"token\">=</span><span class=\"token\">\"sbt check\"</span> lila\n<span class=\"token\">docker</span> compose run --rm -w /scalachess --entrypoint<span class=\"token\">=</span><span class=\"token\">\"sbt prepare\"</span> lila\n\n<span class=\"token\">## 编译</span>\n<span class=\"token\">docker</span> compose run --rm -w /scalachess --entrypoint<span class=\"token\">=</span><span class=\"token\">\"sbt compile\"</span> lila\n\n<span class=\"token\">## 测试</span>\n<span class=\"token\">docker</span> compose run --rm -w /scalachess --entrypoint<span class=\"token\">=</span><span class=\"token\">\"sbt testKit/test\"</span> lila\n\n<span class=\"token\">## 打包</span>\n<span class=\"token\">docker</span> compose run --rm -w /scalachess --entrypoint<span class=\"token\">=</span><span class=\"token\">\"sbt package\"</span> lila</code></pre>\n</div>\n<h3>Dartchess:</h3>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">## 运行格式化程序</span>\n<span class=\"token\">docker</span> compose run --rm -w /dartchess mobile dart <span class=\"token\">format</span> <span class=\"token\">.</span>\n\n<span class=\"token\">## 分析</span>\n<span class=\"token\">docker</span> compose run --rm -w /dartchess mobile <span class=\"token\">bash</span> -c <span class=\"token\">\"dart pub get &amp;&amp; dart analyze\"</span>\n\n<span class=\"token\">## 运行测试</span>\n<span class=\"token\">docker</span> compose run --rm -w /dartchess mobile <span class=\"token\">bash</span> -c <span class=\"token\">\"dart pub get &amp;&amp; dart test -x full_perft\"</span></code></pre>\n</div>\n<h3>本地开发 Chessground</h3>\n<p>默认情况下,您的本地 lila 实例将使用发布到 npm 的 chessground 版本。如果您想要修改该库并看到它们在您的本地 lila 实例中的反映,您可以执行以下操作:</p>\n<ol>\n<li>\n<p>更新 <code class=\"inlineCode___h27aF\">lila</code> 仓库中的 <code class=\"inlineCode___h27aF\">package.json</code>:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-diff\">\"dependencies\": {\n<span class=\"token deleted-sign prefix\">-</span><span class=\"token deleted-sign line\"> \"chessground\": \"^8.3.11\",\n</span><span class=\"token inserted-sign prefix\">+</span><span class=\"token inserted-sign line\"> \"chessground\": \"link:/chessground\",\n</span>}</code></pre>\n</div>\n</li>\n<li>\n<p>以监视模式启动 chessground 编译器:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose run --rm -w /chessground ui <span class=\"token\">bash</span> -c <span class=\"token\">\"pnpm install &amp;&amp; pnpm run compile --watch\"</span></code></pre>\n</div>\n</li>\n<li>\n<p>以监视模式启动 lila ui 构建:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker ui</code></pre>\n</div>\n</li>\n</ol>\n<p>然后您可以在 <a href=\"http://localhost:8090/demo.html\" target=\"_blank\" rel=\"noopener\">http://localhost:8090/demo.html</a> 查看更新后的 chessground 演示,并在刷新 lila 时,它将使用 chessground 的本地副本。</p>\n<h3>本地开发 PGN 查看器</h3>\n<p>在进行更改后重新编译 PGN 查看器:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose run --rm -w /pgn-viewer ui <span class=\"token\">bash</span> -c <span class=\"token\">\"pnpm run sass-dev &amp;&amp; pnpm run bundle-dev\"</span></code></pre>\n</div>\n<p>在 PGN 查看器演示页面上查看更改:<a href=\"http://localhost:8091/\" target=\"_blank\" rel=\"noopener\">http://localhost:8091/</a></p>\n<h3>InfluxDB 监控</h3>\n<p>要查看 InfluxDB 监控仪表板,请启动您的环境并启用 <code class=\"inlineCode___h27aF\">Monitoring</code> 服务,然后访问 <a href=\"http://localhost:8086/\" target=\"_blank\" rel=\"noopener\">http://localhost:8086/</a> (admin/password)</p>\n<p>您还可以通过运行以下命令查看记录的所有指标:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">curl</span> --get http://localhost:8086/query <span class=\"token\">\\</span>\n --header <span class=\"token\">\"Authorization: Token secret\"</span> <span class=\"token\">\\</span>\n --data-urlencode <span class=\"token\">\"db=kamon\"</span> <span class=\"token\">\\</span>\n --data-urlencode <span class=\"token\">\"q=show measurements;\"</span></code><br><br></pre>\n<h3>移动设备</h3>\n<ol>\n<li>\n<p>在您的 Android 手机上:</p>\n<ol>\n<li>将手机连接到与主机相同的 Wi-Fi 网络</li>\n<li>启用开发者模式</li>\n<li>在开发者选项中,启用无线调试并进入其菜单</li>\n</ol>\n</li>\n<li>\n<p>在您的主机机器上:</p>\n<ol>\n<li>\n<p>确保 lila-docker 服务正在运行,并已启动 <code class=\"inlineCode___h27aF\">Mobile</code> 可选服务</p>\n</li>\n<li>\n<p>配置 lila 以使用主机的 IP 地址或主机名而不是 localhost</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker <span class=\"token\">hostname</span></code></pre>\n</div>\n<ul>\n<li>然后验证您的手机可以访问&nbsp;<code class=\"inlineCode___h27aF\">http://[您的选择]:8080</code>&nbsp;上的站点</li>\n</ul>\n</li>\n<li>\n<p>连接到您的手机</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">./lila-docker mobile</code></pre>\n</div>\n</li>\n<li>\n<p>在容器上获取 shell:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\"><span class=\"token\">docker</span> compose <span class=\"token\">exec</span> -it mobile <span class=\"token\">bash</span>\n\n<span class=\"token\"># 验证您的手机已列出</span>\nadb devices</code></pre>\n</div>\n</li>\n<li>\n<p>安装应用程序依赖项:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">flutter pub get\ndart run build_runner build</code></pre>\n</div>\n</li>\n<li>\n<p>运行应用程序:</p>\n<div class=\"MuiBox-root css-1a19m0d\"><button class=\"MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary copy-btn css-1eu2f56\" tabindex=\"0\" type=\"button\"></button>\n<pre><code class=\"language-bash\">flutter run -v <span class=\"token\">\\</span>\n --dart-define <span class=\"token assign-left\">LICHESS_HOST</span><span class=\"token\">=</span><span class=\"token\">$LILA_URL</span> <span class=\"token\">\\</span>\n --dart-define <span class=\"token assign-left\">LICHESS_WS_HOST</span><span class=\"token\">=</span><span class=\"token\">$LILA_URL</span></code></pre>\n</div>\n<ul>\n<li>无需替换。容器上已经设置了&nbsp;<code class=\"inlineCode___h27aF\">$LILA_URL</code>&nbsp;环境变量。</li>\n<li>第一次运行时,可能需要一些时间</li>\n</ul>\n</li>\n</ol>\n</li>\n</ol>\n</div>","status":0,"pv":221,"link":"","createdAt":"2024-05-07 11:45:19","updatedAt":"2025-05-18 18:03:53","field":{},"tags":[]}

article.tags------>[]

news------>[{"id":259,"title":"七弈通用后台数据库配置文件规范","short_title":"","img":"","createdAt":"2024-12-31T10:32:53.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":258,"title":"书库系统更新记录","short_title":"","img":"","createdAt":"2024-12-28T09:33:18.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":254,"title":"用AI辅助帮朋友完成了一个45年同学聚会的视频","short_title":"","img":"","createdAt":"2024-12-05T00:50:11.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":253,"title":"一个很好用的视频格式转换网站","short_title":"","img":"","createdAt":"2024-11-27T10:37:40.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":246,"title":"运营准备","short_title":"","img":"","createdAt":"2024-07-19T14:14:01.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":245,"title":"教学视频","short_title":"","img":"","createdAt":"2024-07-05T00:47:41.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":242,"title":"6月30日工作总结","short_title":"","img":"","createdAt":"2024-06-30T12:03:02.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":241,"title":"今天工作总结","short_title":"","img":"","createdAt":"2024-06-28T10:23:17.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":237,"title":"6月19日工作记录","short_title":"","img":"","createdAt":"2024-06-18T23:57:11.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":236,"title":"我的棋局开发进度","short_title":"","img":"","createdAt":"2024-06-18T14:36:31.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"}]

hot------>[{"id":206,"title":"如何让wsl通过代理访问","path":"/kaifariji/zongjie"},{"id":148,"title":" stockfish中 elo与 skill之间的区别 ","path":"/kaifariji/zongjie"},{"id":81,"title":"禅悦cms系统上一个版本改动汇总","path":"/kaifariji/zongjie"},{"id":22,"title":"对cms系统修改记录","path":"/kaifariji/zongjie"},{"id":210,"title":"lichess的说明","path":"/kaifariji/zongjie"},{"id":172,"title":"解决 Stockfish 引擎在本地测试时的 SharedArrayBuffer 错误","path":"/kaifariji/zongjie"},{"id":49,"title":"一些有用的经验","path":"/kaifariji/zongjie"},{"id":145,"title":"小兔子阿斗的故事","path":"/kaifariji/zongjie"},{"id":108,"title":"纸张克数选择","path":"/kaifariji/zongjie"},{"id":201,"title":"lichess安装指南","path":"/kaifariji/zongjie"}]

imgs------>[{"id":145,"title":"小兔子阿斗的故事","short_title":"","img":"/public/uploads/default/2024/01/17/1705477492766_origin-mceclip0jpg","createdAt":"2024-01-17T07:44:22.000Z","description":"","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":97,"title":"搬迁服务器总结","short_title":"","img":"/public/uploads/default/2023/11/08/1699443000987_mceclip0.jpg.jpg","createdAt":"2023-11-08T10:02:59.000Z","description":"自8月份以来,我们决定将我们的业务入驻亚马逊,被吸引的原因之一是亚马逊提供的一年免费服务器,这似乎非常适合我们这些仍在进行产品测试的客户。","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":79,"title":"记录一下,如何让18年的笔记本支持21:9显示器","short_title":"","img":"/public/uploads/default/2023/11/01/1698876307181_mceclip0.png.png","createdAt":"2023-11-01T13:51:06.000Z","description":"借双十一,给工作站配置了一台带鱼屏34寸显示器,HKC的 曲率1000,京东各种打折下来1276元。原价 1699双11 -400红包 -4.33白条  -8加入hkc会员 -10应当把可以打折的优惠都拿了下来办公室安装 很顺利 直接usb扩展显示器接上就可以用了搬到家里,问题出来了,接hdmi扩展口 显示分辨率不支持21:9  最高只有16:9更新最新的intel 显卡控制中心,无效。。。办公室配熊猫的是采用自定义分辨率。现在系统找不到了。没办法。下载驱动精灵,刷新所有驱动,重启右键。。","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"},{"id":45,"title":"使用cocos creator 开发微信小程序","short_title":"","img":"/public/uploads/default/2023/10/03/1696300737570_mceclip0.png.png","createdAt":"2023-10-01T22:21:25.000Z","description":"一 帐号准备:\n开发者帐号:\n如果不是多端开发,即(网页,android app,ios app,小程序,或多项目,可以不用申请,年费 300元","pinyin":"zongjie","name":"总结","path":"/kaifariji/zongjie"}]

pre------>{"id":208,"title":"docker中测试代理的方法","name":"总结","path":"/kaifariji/zongjie"}

next------>{"id":210,"title":"lichess的说明","name":"总结","path":"/kaifariji/zongjie"}

E