> 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/ru-men-zhi-nan/pro-infrastructure.md).

# Pro 基礎架構

#### 服務

Overleaf Pro 基礎架構包含四個主要服務： `sharelatex`, `git-bridge` （選用）， `mongo` 以及 `redis`。該 `sharelatex` 服務（負責執行主要的 Server Pro 應用程式）依賴於 `mongo` 以及 `redis` 這些服務來提供其資料庫與快取／即時功能，以及 `git-bridge` 以處理 [Git 整合](/on-premises/zh-tw/she-ding/overleaf-toolkit/git-integration.md) （選用）。主機上唯一對外開放的埠是 80，這是由 `sharelatex` 容器內的 .log 檔案。

Server Pro 也可選擇支援 [相容 S3 的儲存空間](/on-premises/zh-tw/she-ding/overleaf-toolkit/s3.md) 以儲存專案檔案與完整專案歷史，並可代理存取主要的 [Overleaf 文件網站arrow-up-right](https://www.overleaf.com/learn)。如需更多資訊，請參閱我們關於 [新增 LaTeX 使用者說明](broken://pages/e1bea0ea039bee3fe2cfa06f0eced9961038b95a) 頁面。

{% hint style="info" %}
如有需要，可使用環境變數將 MongoDB 與 Redis 外部化，指向外部服務。如需更多資訊，請參閱 [設定 Overleaf](broken://pages/bee4c82a30586f16dd4f9e8e432de3ea2df074eb) 如果您使用的是 Docker Compose，且 [Toolkit 設定](broken://pages/fef3d32ddb8323c72a58681ceb7edf40b951f528) 如果使用 Overleaf Toolkit。
{% endhint %}

#### 編譯

適用於 [Sandboxed Compiles](broken://pages/62029113e67494d78d16303f3fbf09dcd5cd61f1)，該 `sharelatex` 容器將協調建立新的容器來處理專案編譯；它透過主機上的 Docker socket 來執行此操作。您可以在此閱讀更多關於編輯器與端到端編譯／快取流程的說明 [這裡](/on-premises/zh-tw/ru-men-zhi-nan/microservices.md#editor-and-compile-process).

#### 網路

容器之間的通訊是透過專用橋接網路，藉由 Docker 的內部 DNS 解析來實現，且未啟用防火牆。預設情況下，上述服務會使用各自的標準埠，但可透過環境變數進行 `sharelatex` 容器使用 80 埠提供外部網頁存取（由 Nginx 提供服務），而 `mongo` 容器使用 27017 埠，而 `redis` 使用 6379 埠。

對於使用我們代管方案的客戶 [Overleaf Toolkitarrow-up-right](https://github.com/overleaf/toolkit)，您可以選擇性地 [啟用 TLS 代理](broken://pages/d5ac6e88999ed666398cc42f7481c3d6e3482866) 以透過環境變數使用 Nginx 來終止 HTTPS 連線。或者，您也可以使用既有的 TLS 代理。

{% hint style="info" %}
您可以查看說明請求流程的圖表 [這裡](broken://pages/d5ac6e88999ed666398cc42f7481c3d6e3482866).
{% endhint %}

#### 摘要

* 在 Docker 網路之外，只有 80 埠可存取，並繫結至 Nginx。 **注意：** 此 `sharelatex` 容器運行多個 [服務arrow-up-right](https://github.com/overleaf/overleaf/tree/main/services) 彼此透過 HTTP 進行通訊。不過，這些埠 **不要** 可從 Docker 網路外部存取。
* 在 Docker 網路內，Overleaf 服務、MongoDB、Redis 與 Git Bridge 可以自由互相通訊。
* 在 [Sandboxed Compiles](broken://pages/62029113e67494d78d16303f3fbf09dcd5cd61f1) 容器內，沒有可用的網路。

相關主題請見：

* [微服務](/on-premises/zh-tw/ru-men-zhi-nan/microservices.md)
* [什麼是 Overleaf Toolkit？](/on-premises/zh-tw/ru-men-zhi-nan/what-is-the-overleaf-toolkit.md)


---

# 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/ru-men-zhi-nan/pro-infrastructure.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.
