diff --git a/.work/extra/doc/2.USAGE_EN.md b/.work/extra/doc/2.USAGE_EN.md index d536555..facaf86 100644 --- a/.work/extra/doc/2.USAGE_EN.md +++ b/.work/extra/doc/2.USAGE_EN.md @@ -89,7 +89,23 @@ After you adjust the `.env` configuration, `docker-compose.yml` will be automati **Note:** `docker-compose.yml` is automatically generated, manual modification is not recommended. You should modify the `.env` configuration to achieve custom requirements. -### (2) Namespace Configuration (CONTAINER_NAMESPACE) +### (2) Configuration File Lifecycle + +#### ① After Downloading +When you first download the project, there are no `.env` or `docker-compose.yml` files in the root directory. + +#### ② After Installation +After executing the `_install.sh` script to complete installation, `.env` and `docker-compose.yml` files will be generated in the root directory based on the default configurations of each service. + +#### ③ During Usage +As long as the `.env` file exists, it will not be overwritten or regenerated. So, after installation, during all usage stages such as starting or stopping services, you can safely modify the configurations in `.env`. At the same time, `docker-compose.yml` will be automatically updated based on changes in `.env`. + +#### ④ After Usage +> If you don't have development needs, don't delete the configuration files in the root directory, or make backups. + +After usage, just keep the `.env` file. Do NOT delete the `.env` file arbitrarily. If you accidentally delete the `.env` file, a new default configuration will be generated, and all your custom modifications will be lost! + +### (3) Namespace Configuration (CONTAINER_NAMESPACE) **Use Case:** diff --git a/.work/extra/doc/2.USAGE_ZH.md b/.work/extra/doc/2.USAGE_ZH.md index b09c8c7..fc1a2e0 100644 --- a/.work/extra/doc/2.USAGE_ZH.md +++ b/.work/extra/doc/2.USAGE_ZH.md @@ -73,7 +73,7 @@ bash _install.sh ## 四、功能配置 -### 1、配置文件分类 +### 1、配置文件介绍 在项目根目录下会有两个核心配置文件:`.env` 和 `docker-compose.yml`。这些文件会在你首次使用启动命令时自动生成。 @@ -93,7 +93,23 @@ bash _install.sh **注意:** `docker-compose.yml` 是自动生成的,不建议手动修改。你应该修改 `.env` 配置来实现自定义需求。 -### 2、命名空间配置(CONTAINER_NAMESPACE) +### 2、配置文件的生命周期 + +#### (1) 下载后 +当项目刚下载到本地后,根目录下默认没有 `.env` 和 `docker-compose.yml` 文件。 + +#### (2) 安装后 +当执行```_install.sh```脚本完成安装后,会在根目录下基于各服务的默认配置生成 `.env` 和 `docker-compose.yml` 文件。 + +#### (3) 使用中 +只要 `.env` 文件存在,就不会被覆盖或重复生成。所以,当完成安装后,在使用中的各个阶段,比如启动或停止时,你都可以放心修改`.env`其中的配置。同时,`docker-compose.yml` 会根据 `.env` 的修改再自动更新。 + +#### (4) 使用后 +> 如果你没有开发需求,就不要删除根目录下的配置文件,或者做好备份。 + +在使用后,还保留`.env`文件即可,一定不要随意删除`.env`文件,如果不小心删除了 `.env` 文件,会重新生成一份默认配置,之前的所有自定义修改都会丢失! + +### 3、命名空间配置(CONTAINER_NAMESPACE) **应用场景:**