forked from deployphp/deployer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflow_framework.php
47 lines (39 loc) · 1.01 KB
/
flow_framework.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Deployer;
require_once __DIR__ . '/common.php';
add('recipes', ['flow_framework']);
// Flow-Framework application-context
set('flow_context', 'Production');
// Flow-Framework cli-command
set('flow_command', 'flow');
// Flow-Framework shared directories
set('shared_dirs', [
'Data/Persistent',
'Data/Logs',
'Configuration/{{flow_context}}'
]);
/**
* Apply database migrations
*/
desc('Apply database migrations');
task('deploy:run_migrations', function () {
run('FLOW_CONTEXT={{flow_context}} {{bin/php}} {{release_or_current_path}}/{{flow_command}} doctrine:migrate');
});
/**
* Publish resources
*/
desc('Publish resources');
task('deploy:publish_resources', function () {
run('FLOW_CONTEXT={{flow_context}} {{bin/php}} {{release_or_current_path}}/{{flow_command}} resource:publish');
});
/**
* Main task
*/
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'deploy:run_migrations',
'deploy:publish_resources',
'deploy:publish',
]);