How to Deploy a Flow Framework Project
require 'recipe/flow_framework.php';
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.
The deploy task of Flow Framework consists of:
- deploy:prepare – Prepares a new release
- deploy:info – Displays info about deployment
- deploy:setup – Prepares host for deploy
- deploy:lock – Locks deploy
- deploy:release – Prepares release
- deploy:update_code – Updates code
- deploy:env – Configure .env file
- deploy:shared – Creates symlinks for shared files and dirs
- deploy:writable – Makes writable dirs
- deploy:vendors – Installs vendors
- deploy:run_migrations – Applies database migrations
- deploy:publish_resources – Publishes resources
- deploy:publish – Publishes the release
- deploy:symlink – Creates symlink to release
- deploy:unlock – Unlocks deploy
- deploy:cleanup – Cleanup old releases
- deploy:success – Deploys your project
The flow_framework recipe is based on the common recipe.
Configuration
flow_context
Flow-Framework application-context
Default value
'Production'
flow_command
Flow-Framework cli-command
Default value
'flow'
shared_dirs
Overrides shared_dirs from recipe/deploy/shared.php
.
Flow-Framework shared directories
Default value
[
'Data/Persistent',
'Data/Logs',
'Configuration/{{flow_context}}',
]
Tasks
deploy:run_migrations
Applies database migrations.
Apply database migrations
deploy:publish_resources
Publishes resources.
Publish resources
deploy
Deploys your project.
Main task
This task is group task which contains next tasks: