From 0cb08642aa977d3b300668c5e2cb2f141b6ce93f Mon Sep 17 00:00:00 2001 From: yuanzhen869 Date: Fri, 20 Mar 2026 15:11:01 +0800 Subject: [PATCH] Mount dist outputs to the host --- README.md | 1 + README_en.md | 1 + docker-compose.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index d2c454f..c2b935e 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ web/ 页面与静态资源 - `docker-compose.yml`、`Dockerfile`、`tools/` 都位于项目主目录 - 默认主配置面向远程 MySQL - `docker-compose.test.yml` 中的 MySQL 仅用于本地测试 +- 容器内生成的 `dist/device_index.json` 与 `dist/mobilemodels_mysql_seed.sql` 会直接挂载到宿主机项目根目录的 `dist/` - Compose 会优先读取 shell 环境变量和项目根目录 `.env`,再回退到 `docker-compose.yml` 默认值 - 上游原始 git 同步、索引构建和 MySQL 刷新都在容器内完成 - 项目内置“每日自动同步”调度,不依赖 GitHub Actions;时间点可在数据管理页设置,也可用 `.env` 覆盖默认值 diff --git a/README_en.md b/README_en.md index d622995..6ff061b 100644 --- a/README_en.md +++ b/README_en.md @@ -43,6 +43,7 @@ Notes: - `docker-compose.yml`, `Dockerfile`, and `tools/` live in the project root - the main compose file targets remote MySQL usage - `docker-compose.test.yml` provides a local MySQL only for testing +- generated `dist/device_index.json` and `dist/mobilemodels_mysql_seed.sql` are bind-mounted back to the host project's `dist/` directory - Compose reads shell env vars and project-root `.env` first, then falls back to defaults in `docker-compose.yml` - upstream git sync, index rebuild, and MySQL refresh run inside containers - the project includes its own daily sync scheduler; you can configure the time in the Data Management page or override it via `.env` diff --git a/docker-compose.yml b/docker-compose.yml index f644748..dab48e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,7 @@ services: ports: - "8123:8123" volumes: + - ./dist:/app/dist - mobilemodels_app_data:/data extra_hosts: - "host.docker.internal:host-gateway"