> 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/kai-shi-shi-yong/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` 容器。

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

{% hint style="info" %}
如有需要，可使用環境變數將 MongoDB 和 Redis 外部化，以指向外部服務。如需更多資訊，請參閱 [設定 Overleaf](/on-premises/zh-tw/she-ding/overleaf-toolkit.md) ，如果你使用的是 Docker Compose；以及 [Toolkit 設定](/on-premises/zh-tw/she-ding/overleaf-toolkit/toolkit-settings.md) ，如果你使用的是 Overleaf Toolkit。
{% endhint %}

#### 編譯

對於 [沙箱化編譯](broken://pages/62029113e67494d78d16303f3fbf09dcd5cd61f1)， `sharelatex` 容器會協調建立新的容器來處理專案編譯；它透過主機上的 Docker socket 來完成這件事。你可以在這裡閱讀更多關於編輯器與端到端編譯／快取流程的內容 [這裡](/on-premises/zh-tw/kai-shi-shi-yong/microservices.md#editor-and-compile-process).

#### 網路

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

對於使用我們代管方案的客戶 [Overleaf Toolkit 右上箭頭](https://github.com/overleaf/toolkit)，你可以選擇 [啟用 TLS 代理伺服器](broken://pages/d5ac6e88999ed666398cc42f7481c3d6e3482866) ，透過環境變數使用 Nginx 終止 HTTPS 連線。或者，你也可以使用現有的 TLS 代理伺服器。

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

#### 摘要

* 在 Docker 網路之外，只有 80 連接埠可供存取，並且綁定到 Nginx。 **注意：** 該 `sharelatex` 容器執行許多 [服務右上箭頭](https://github.com/overleaf/overleaf/tree/main/services) ，它們彼此之間透過 HTTP 通訊。不過，這些連接埠 **不** 可從 Docker 網路外部存取。
* 在 Docker 網路內，Overleaf 服務、MongoDB、Redis 和 Git Bridge 可以自由彼此通訊。
* 在內部 [沙箱化編譯](broken://pages/62029113e67494d78d16303f3fbf09dcd5cd61f1) 容器中，沒有可用的網路。

相關主題請參閱：

* [微服務](/on-premises/zh-tw/kai-shi-shi-yong/microservices.md)
* [什麼是 Ayakaleaf Toolkit？](/on-premises/zh-tw/kai-shi-shi-yong/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://ayakaleaf-pro.ayaka.space/on-premises/zh-tw/kai-shi-shi-yong/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.
