> For the complete documentation index, see [llms.txt](https://tarsphp.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tarsphp.gitbook.io/doc/en/framework/tars-deploy.md).

# tars-deploy document

## Introduction

**Tars-deploy** is used to package the project and facilitate the distribution of tool components on the tars management platform.

## Instructions

1. Dependence
   * Phar extension
2. Make sure the `./tars/tars.proto.php` file under the project exists and contains the following

```php
return array(
    'appName' => 'APPNAME', //app名称 如tars.tarsconfig中的tars
    'serverName' => 'SERVERNAME', //服务名 如tars.tarsconfig中的tarsconfig
    //...
);
```

1. Introduce **tars-deploy** to the project's composer.json
2. Add the following to the project composer.json

```javascript
"scripts": {
    "deploy": "\\Tars\\deploy\\Deploy::run"
}
```

1. Execute the command `composer run-script deploy` in the project directory to generate a compressed package of the project to be uploaded
