-
Notifications
You must be signed in to change notification settings - Fork 0
/
shopware.php
77 lines (61 loc) · 1.72 KB
/
shopware.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
// >jetrails_
// https://github.com/jetrails/deployer-autopilot
declare(strict_types=1);
namespace Deployer;
require "./vendor/autoload.php";
require "recipe/shopware.php";
require "recipe/autopilot.php";
// Config (Replace with your own)
set("primary_domain", "example.com");
set("cluster_user", "jrc-4d91-kn39");
set("elastic_ip", "0.0.0.0");
// Config (Standard)
set("deploy_path", "/var/www/{{primary_domain}}");
set("current_path", "/var/www/{{primary_domain}}/live");
set("writable_mode", "chmod");
set("writable_recursive", true);
set("writable_chmod_mode", "u=rwX,g=u,o=rX");
set("http_user", "www-data");
set("http_group", "www-data");
set("become", "www-data");
set("keep_releases", 5);
/**
* Writable directories.
*
* The following setting will enable updates and managing plugins from the
* Shopware admin.
*
* ```php
* add("writable_dirs", ["{{release_path}}"]);
* ```
*/
add("writable_dirs", ["{{release_path}}"]);
/**
* Release name.
*
* The following setting will enable date based release names.
*
* ```php
* set("release_name", "{{autopilot_release_name}}");
* ```
*
* The format for these release names is YYYY-MM-DD-NNN where NNN is the
* release number.
*/
set("release_name", "{{autopilot_release_name}}");
// Hosts
host("production")
->set("remote_user", "{{cluster_user}}")
->set("hostname", "{{elastic_ip}}")
->set("port", "22");
// Restart services and flush cache
task("autopilot:restart:all", [
"autopilot:restart:nginx",
"autopilot:restart:php-fpm",
"autopilot:restart:varnish",
"autopilot:flush:redis-cache",
]);
// Unlock on failure and restart services on success
after("deploy:success", "autopilot:restart:all");
after("deploy:failed", "deploy:unlock");