2021-09-26 15:25:58 +02:00
|
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
|
<!-- Instead edit recipe/flow_framework.php -->
|
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
|
2022-09-12 11:40:11 +02:00
|
|
|
|
# How to Deploy a Flow Framework Project
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
2022-09-12 12:29:44 +02:00
|
|
|
|
```php
|
|
|
|
|
require 'recipe/flow_framework.php';
|
|
|
|
|
```
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
[Source](/recipe/flow_framework.php)
|
|
|
|
|
|
2022-09-12 11:40:11 +02:00
|
|
|
|
Deployer is a free and open source deployment tool written in PHP.
|
|
|
|
|
It helps you to deploy your Flow Framework application to a server.
|
|
|
|
|
It is very easy to use and has a lot of features.
|
|
|
|
|
|
|
|
|
|
Three main features of Deployer are:
|
|
|
|
|
- **Provisioning** - provision your server for you.
|
|
|
|
|
- **Zero downtime deployment** - deploy your application without a downtime.
|
|
|
|
|
- **Rollbacks** - rollback your application to a previous version, if something goes wrong.
|
|
|
|
|
|
|
|
|
|
Additionally, Deployer has a lot of other features, like:
|
|
|
|
|
- **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax.
|
|
|
|
|
- **Fast** - Deployer is very fast. It uses parallel connections to deploy your application.
|
|
|
|
|
- **Secure** - Deployer uses SSH to connect to your server.
|
|
|
|
|
- **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks.
|
|
|
|
|
|
|
|
|
|
You can read more about Deployer in [Getting Started](/docs/getting-started.md).
|
|
|
|
|
|
|
|
|
|
The [deploy](#deploy) task of **Flow Framework** consists of:
|
|
|
|
|
* [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release
|
|
|
|
|
* [deploy:info](/docs/recipe/deploy/info.md#deployinfo) – Displays info about deployment
|
|
|
|
|
* [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy
|
|
|
|
|
* [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy
|
|
|
|
|
* [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release
|
|
|
|
|
* [deploy:update_code](/docs/recipe/deploy/update_code.md#deployupdate_code) – Updates code
|
|
|
|
|
* [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs
|
|
|
|
|
* [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs
|
|
|
|
|
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) – Installs vendors
|
|
|
|
|
* [deploy:run_migrations](/docs/recipe/flow_framework.md#deployrun_migrations) – Applies database migrations
|
|
|
|
|
* [deploy:publish_resources](/docs/recipe/flow_framework.md#deploypublish_resources) – Publishes resources
|
|
|
|
|
* [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release
|
|
|
|
|
* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release
|
|
|
|
|
* [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy
|
|
|
|
|
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases
|
|
|
|
|
* [deploy:success](/docs/recipe/common.md#deploysuccess) –
|
2022-07-26 09:18:44 +02:00
|
|
|
|
|
|
|
|
|
|
2022-07-26 00:19:14 +02:00
|
|
|
|
The flow_framework recipe is based on the [common](/docs/recipe/common.md) recipe.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
### flow_context
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L9)
|
|
|
|
|
|
|
|
|
|
Flow-Framework application-context
|
|
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
|
'Production'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### flow_command
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L12)
|
|
|
|
|
|
|
|
|
|
Flow-Framework cli-command
|
|
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
|
'flow'
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### shared_dirs
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L15)
|
|
|
|
|
|
2021-10-18 18:29:14 +02:00
|
|
|
|
Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
Flow-Framework shared directories
|
|
|
|
|
|
|
|
|
|
```php title="Default value"
|
|
|
|
|
[
|
|
|
|
|
'Data/Persistent',
|
|
|
|
|
'Data/Logs',
|
|
|
|
|
'Configuration/{{flow_context}}'
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
|
|
### deploy:run_migrations
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L25)
|
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Applies database migrations.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
Apply database migrations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### deploy:publish_resources
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L33)
|
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Publishes resources.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
Publish resources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### deploy
|
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/recipe/flow_framework.php#L41)
|
|
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
|
Deploys your project.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|
|
Main task
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This task is group task which contains next tasks:
|
|
|
|
|
* [deploy:prepare](/docs/recipe/common.md#deployprepare)
|
|
|
|
|
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors)
|
|
|
|
|
* [deploy:run_migrations](/docs/recipe/flow_framework.md#deployrun_migrations)
|
|
|
|
|
* [deploy:publish_resources](/docs/recipe/flow_framework.md#deploypublish_resources)
|
|
|
|
|
* [deploy:publish](/docs/recipe/common.md#deploypublish)
|
|
|
|
|
|
|
|
|
|
|