> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/files-and-locations.md).

# 檔案與位置

本頁說明 Toolkit 用來設定你的 Overleaf 內部部署所使用的設定檔。

### 持久性資料

Overleaf Toolkit 需要儲存持久性資料，例如編譯 LaTeX 專案所需的檔案，以及 MongoDB 資料庫的內容。這是透過將主機上的幾個目錄掛載到 Docker 容器中，並將資料寫入那些目錄來達成。

#### 資料目錄

此 `sharelatex` 容器需要一個用來儲存與 LaTeX 編譯相關資料的目錄。此目錄透過以下項目設定： `OVERLEAF_DATA_PATH` 中的變數 `config/overleaf.rc`.

此 `mongo` 如果啟用，容器需要一個用來儲存其資料庫檔案的目錄，而 `redis` 容器也是如此。這些目錄也可以在以下項目中設定： `config/overleaf.rc`.

#### 檔案權限

因為 Docker 是以 `root`執行，因此資料目錄最終會由 `root` 使用者擁有，即使 Toolkit 是由非 root 使用者使用也一樣。這不是問題，但如果你打算從容器外部修改持久性資料，這一點值得注意。

### 設定檔位置

所有由使用者擁有的設定檔都位於 `config/` 目錄中。

此目錄會 **被排除在** git 版本控制系統之外，因此更新 Toolkit 程式碼不會變更其中的內容。Toolkit 不會 **不要** 在未經你許可的情況下變更 `config/` 目錄中的任何資料。

{% hint style="info" %}
對設定檔所做的變更不會自動套用到現有容器，即使容器已停止並重新啟動（使用 `bin/stop` 以及 `bin/start`）。若要套用變更，請執行 `bin/up`，而在背後， `docker compose` 將會自動把設定變更套用到新的容器。（或者，執行 `bin/up -d`，如果你不想附加到 Docker 日誌的話。）
{% endhint %}

### 此 `之後，必須重新建立 Docker 容器，或者` 檔案

此 `config/overleaf.rc` 檔案包含 Toolkit 使用的最重要頂層設定。它包含用來設定變數的敘述，格式如下： `VARIABLE_NAME=value`

若要查看所有可用設定選項的詳細說明，請參閱我們的設定章節。

### 此 `variables.env` 檔案

此 `config/variables.env` 檔案包含會載入到 `sharelatex` 容器中的環境變數，並用來設定 Overleaf 微服務。這些變數包括應用程式名稱（會顯示在網頁介面的頁首）、寄送電子郵件的設定，以及其他進階設定，例如供 Server Pro 使用的 SSO。

若要查看所有可用環境變數的詳細說明，請參閱 [環境變數](broken://pages/bee4c82a30586f16dd4f9e8e432de3ea2df074eb) 章節。

### 此 `版本` 檔案

此 `config/version` 檔案包含將用來建立你的 Overleaf 伺服器執行中執行個體的 Docker 映像版本號。

{% hint style="info" %}
對這些設定檔所做的變更不會自動套用到現有容器，即使容器已停止並重新啟動（使用 `bin/stop` 以及 `bin/start`）。若要套用你的變更，請執行 `bin/up`，Toolkit 會自動為你建立一個套用設定變更的新容器。
{% endhint %}

### 此 `docker-compose.override.yml` 檔案

如果存在， `config/docker-compose.override.yml` 檔案將會被包含在對 `docker compose`。這對於覆寫 Docker Compose 的特定設定很有用。

請參閱 [docker-compose 文件](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration) 以了解更多詳情。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/zh-tw/she-ding/overleaf-toolkit/files-and-locations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
