> 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/ko/maintenance/docker-compose.yml-to-toolkit-migration.md).

# docker-compose.yml에서 Toolkit으로 마이그레이션

현재 Docker Compose를 통해 `docker-compose.yml` 파일을 사용 중이라면, Toolkit으로 마이그레이션하면 온프레미스 버전의 Overleaf를 더 쉽게 배포, 업그레이드 및 유지관리할 수 있습니다.

마이그레이션하려면 기존 Docker Compose 설정을 Toolkit에서 사용하는 형식으로 변환해야 합니다. 이 과정에는 기존 구성을 Toolkit으로 복사하는 작업이 포함됩니다.

이 가이드는 이 과정을 단계별로 안내하여 Docker Compose에서 Toolkit으로 원활하게 마이그레이션할 수 있도록 도와줍니다.

{% hint style="info" %}
이 지침은 v4.x 및 그 이전 버전용입니다. 따라서 모든 변수는 `SHARELATEX_` 대신 접두사 `OVERLEAF_`.
{% endhint %}

{% stepper %}
{% step %}

### Toolkit 저장소 복제

먼저 Toolkit 저장소를 호스트 머신에 복제합니다:

```bash
git clone https://github.com/overleaf/toolkit.git ./overleaf-toolkit
```

다음으로 `bin/init` 명령을 실행하여 기본 구성을 사용해 Toolkit을 초기화합니다.
{% endstep %}

{% step %}

### 이미지 및 버전 설정

일반적인 `docker-compose.yml` 에서는 이미지와 버전이 구성 요소 설명에 정의됩니다. 예:

```yaml
version: '2.2'
services:
    sharelatex:
        restart: always
        # Server Pro 사용자:
        # image: quay.io/sharelatex/sharelatex-pro
        image: sharelatex/sharelatex:3.5.13
```

Toolkit을 사용할 때는 이미지 이름이 자동으로 확인되며, 필요한 것은 `SERVER_PRO=true` 의 **config/overleaf.rc** 를 설정하여 Server Pro 이미지를 선택하거나 `SERVER_PRO=false` 를 설정하여 Community Edition을 사용합니다.

원하는 Server Pro/Community Edition 버전 번호는 **config/version** 파일에 설정됩니다. Toolkit은 다음과 같은 특정 버전 번호를 필요로 합니다. `4.2.3`. 만약 `latest`를 사용 중이라면 `bin/images` 를 사용하여 로컬 `latest` 버전의 이미지 ID를 찾은 다음, 2.x.x, 3.x.x, 4.x.x 또는 5.x.x의 릴리스 노트를 사용하여 이미지 ID를 버전에 매핑합니다.

이미지를 자체 내부 레지스트리에서 가져오는 경우, `OVERLEAF_IMAGE_NAME`을 설정하여 Toolkit이 사용하는 이미지를 재정의할 수 있습니다. Toolkit이 자동으로 귀하의 **config/version** 파일로 설정해 주세요.
{% endstep %}

{% step %}

### 외부 액세스 구성

기본적으로 Overleaf는 `127.0.0.1:80`에서 수신 대기하며, Docker 호스트 머신의 트래픽만 허용합니다.

외부 액세스를 허용하려면 `OVERLEAF_LISTEN_IP` 및 `OVERLEAF_PORT` 다음에서 [**config/overleaf.rc**](/on-premises/ko/configuration/overleaf-toolkit/environment-variables.md) 파일로 설정해 주세요.
{% endstep %}

{% step %}

### 환경 변수 마이그레이션

아마 다음과 같은 환경 변수 집합이 `sharelatex` 의 service에 정의되어 있을 것입니다. 예: `docker-compose.yml`, 예:

```yaml
environment:
    OVERLEAF_APP_NAME: Overleaf Community Edition
    OVERLEAF_PROXY_LEARN: 'true'
    …
```

이 변수들을 Toolkit의 [**config/variables.env**](broken://pages/906d29a7f121d3d121ddd462343b3b44ff90041a) 파일에 복사하고, 다음 형식을 따르세요( `=` 대신 `:`):

```env
OVERLEAF_APP_NAME=Overleaf Community Edition
OVERLEAF_PROXY_LEARN=true
```

Toolkit을 사용할 때의 예외 / 차이점:

* 다음으로 시작하는 변수는 `SANDBOXED_COMPILES_` 및 `DOCKER_RUNNER` 는 더 이상 필요하지 않습니다. Sandboxed Compiles를 사용하려면 `SIBLING_CONTAINERS_ENABLED=true` 에서 **config/overleaf.rc** 파일로 설정해 주세요.
* 다음으로 시작하는 변수는 `OVERLEAF_MONGO_`, `OVERLEAF_REDIS_` 및 `REDIS_HOST` 변수는 더 이상 필요하지 않습니다. MongoDB와 Redis는 이제 **config/overleaf.rc** 파일에서 사용하여 구성됩니다 `MONGO_URL`, `REDIS_HOST` 및 `REDIS_PORT`.

고급 구성 옵션은 위에 링크된 [config/overleaf.rc](/on-premises/ko/configuration/overleaf-toolkit/environment-variables.md) 문서를 참조하세요.
{% endstep %}

{% step %}

### NGINX 프록시

마이그레이션 방법에 대한 지침은 `nginx`를 참조하세요. [TLS 프록시 문서](/on-premises/ko/configuration/overleaf-toolkit/tls-proxy.md):
{% endstep %}

{% step %}

### 볼륨

데이터 볼륨의 위치를 **config/overleaf.rc**:

#### ShareLaTeX

를 `OVERLEAF_DATA_PATH` 에서 사용하는 데이터 볼륨의 위치로 설정합니다. `sharelatex` 컨테이너.

#### MongoDB

를 `MONGO_DATA_PATH` 에서 사용하는 데이터 볼륨의 위치로 설정합니다. `mongo` 컨테이너.

#### Redis

를 `REDIS_DATA_PATH` 에서 사용하는 데이터 볼륨의 위치로 설정합니다. `redis` 컨테이너.
{% endstep %}
{% endstepper %}

자세한 내용과 고급 구성은 위에 연결된 관련 Toolkit 구성 문서를 참조하세요.


---

# 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/ko/maintenance/docker-compose.yml-to-toolkit-migration.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.
