-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeploy.sample.php
39 lines (28 loc) · 1.11 KB
/
deploy.sample.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
<?php
namespace Deployer;
require 'recipe/symfony4.php';
// This is the ip (or DNS) of the host where you want to deploy
host('<host_ip_address>')
// This is the directory in the host
->set('deploy_path', '/var/www/mappics')
// This is the user that is connecting to the host
->user('<user>')
// You can also use you ssh key to connect to the host
->identityFile('~/.ssh/id_rsa');
set('application', 'mappics');
set('repository', 'git@github.com:antodippo/mappics.git');
set('git_tty', true);
add('shared_dirs', ['public/galleries', 'var/galleries', 'var/log', 'var/sessions']);
set('shared_files', ['.env', 'var/mappics_prod.db']);
set('bin_dir', 'bin');
set('var_dir', 'var');
set('assets', ['public/css', 'public/images', 'public/js']);
set('keep_releases', 3);
task('build', function () {
run('cd {{release_path}} && build');
});
task('deploy:assets:install', function () {
run('{{bin/php}} {{bin/console}} assets:install {{console_options}} {{release_path}}/public');
})->desc('Install bundle assets');
after('deploy:failed', 'deploy:unlock');
before('deploy:symlink', 'database:migrate');