> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Ayakaleaf Toolkit とは?

Ayakaleaf Toolkit は、Community Edition および Ayakaleaf Pro のオンプレミスインストールに推奨されるデプロイ方法であり、最も一般的な環境である単一の物理サーバーまたは仮想マシンで動作するように設計されています。Toolkit は `docker compose` を使用してサーバーの Docker コンテナを管理し、`docker` コマンドをラップする一連のスクリプトを提供することで、オンプレミス版 Overleaf の管理における技術的な側面を支援します。

#### `bin/docker-compose` ラッパー

`bin/docker-compose` スクリプトは `docker compose` のラッパーです。`config/` ディレクトリから設定を読み込んだ後、スクリプトに渡された引数で `docker compose` を呼び出します。

`bin/docker-compose` は、マシンにインストールされている `docker compose` プログラムの透過的なラッパーとして扱うことができます。

例:

```bash title="Check running containers" theme={null}
$ bin/docker-compose ps
```

#### 便利なヘルパー

`bin/docker-compose` に加えて、Toolkit には一般的なタスクを支援する便利なスクリプトが用意されています。

* `bin/up`: `bin/docker-compose up` のショートカット
* `bin/start`: `bin/docker-compose start` のショートカット
* `bin/stop`: `bin/docker-compose stop` のショートカット
* `bin/shell`: **sharelatex** コンテナ内でシェルを起動します
* `bin/doctor`: インストールとデプロイに関する情報を収集するためのスクリプト。後述の「サーバーのチェック」セクションを参照してください
* `bin/mongo`: **mongo** コンテナ内でシェルを起動し、正しいデータベース(**sharelatex**)に切り替えます
* `bin/backup-config`: 現在の設定のコピー(zip または tar)を作成し、任意の保存先ディレクトリに保存します
* `bin/logs`: サービスログを表示/追跡します
* `bin/error-logs`: サービスのエラーログを表示/追跡します
* `bin/rename-env-vars-5-0`: **config/variables.env** の環境変数を更新する移行スクリプト(ShareLaTeX から Overleaf へのリブランディング)
* `bin/rename-rc-vars`: **config/overleaf.rc** の環境変数を更新する移行スクリプト(ShareLaTeX から Overleaf へのリブランディング)
* `bin/run-script`: **sharelatex** コンテナ内に保存されているスクリプトの実行を簡単にするヘルパー
* `bin/upgrade`: インスタンスのアップグレードを支援します。このスクリプトは(git 経由で)Toolkit の更新を確認して変更の取得を提案し、最新の Docker イメージのバージョンを確認して更新を提案します。段階的な確認、現在の設定をバックアップするオプションを提供し、Docker サービスの停止/起動を処理します。詳細はデプロイメントのアップグレードを参照してください: [https://docs.overleaf.com/on-premises/maintenance/upgrading-your-deployment](https://docs.overleaf.com/on-premises/maintenance/upgrading-your-deployment)

<Info>
  Docker のログにアタッチせずにインスタンスを実行したい場合は、`bin/up -d` を実行してデタッチモードで起動できます。
</Info>

#### サーバーのチェック

Overleaf Toolkit には `bin/doctor` という便利なスクリプトが含まれており、満たされていない依存関係を示すレポートを生成します。

先に進む前に、`bin/doctor` スクリプトを実行して、すべてが正しく動作していることを確認してください。

```bash title="Run Overleaf Doctor" theme={null}
bin/doctor
```

出力例(一部省略/説明用):

<Accordion title="bin/doctor の出力例">
  ```text theme={null}
  ====== Overleaf Doctor ======
  - Host Information
      - Linux
      - Output of 'lsb_release -a':
              No LSB modules are available.
              Distributor ID:     Ubuntu
              Description:        Ubuntu 22.04.5 LTS
              Release:    22.04
              Codename:   jammy
  - Dependencies
      - bash
          - status: present
          - version info: 5.1.16(1)-release
      - docker
          - status: present
          - version info: Docker version 27.3.1, build ce12230
      - realpath
          - status: present
          - version info: realpath (GNU coreutils) 8.32
      - perl
          - status: present
          - version info: 5.034000
      - awk
          - status: present
          - version info: GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
      - openssl
          - status: present
          - version info: OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
      - docker compose
          - status: present
          - version info: Docker Compose version v2.29.7
  - Docker Daemon
      - status: up
  ====== Configuration ======
  - config/version
      - status: present
      - version: 5.1.1
  - config/overleaf.rc
      - status: present
      - values
          - OVERLEAF_DATA_PATH: data/overleaf
          - OVERLEAF_LOG_PATH: data/overleaf/logs
          - SERVER_PRO: true
              - logged in to quay.io: true
          - SIBLING_CONTAINERS_ENABLED: true
          - OVERLEAF_LISTEN_IP: 0.0.0.0
          - OVERLEAF_PORT: 80
          - MONGO_ENABLED: true
          - MONGO_IMAGE: mongo
          - MONGO_VERSION: 6.0
          - MONGO_DATA_PATH: data/mongo
          - REDIS_ENABLED: true
          - REDIS_IMAGE: redis:6.2
          - REDIS_DATA_PATH: data/redis
  - config/variables.env
      - status: present
      - values
          - OVERLEAF_FILESTORE_BACKEND: fs
          - OVERLEAF_HISTORY_BACKEND: fs
  ====== Warnings ======
  - None, all good
  ====== End ======
  ```
</Accordion>

依存関係が不足している場合、doctor は警告を出力します。問題が発生した場合は、まず `bin/doctor` を実行し、その出力に警告がないか確認してください。

<Info>
  * Ayakaleaf Pro Edition のユーザーは GitHub で issue を作成できます: [https://github.com/ayaka-notes/toolkit/issues](https://github.com/ayaka-notes/toolkit/issues)

  いずれの場合も、メッセージに `bin/doctor` の出力を含めてください。
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.