> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-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` 將自動把設定變更套用到新的容器。（或者，如果您不想附加到 Docker 日誌，請執行 `bin/up -d`）。
{% endhint %}

### 該 `overleaf.rc` 檔案

該 `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://ayakaleaf-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.
