-
Notifications
You must be signed in to change notification settings - Fork 15
/
deploy-config.php
136 lines (135 loc) · 4.12 KB
/
deploy-config.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?php
/**
* Deployment configuration
*
* It's preferable to configure the script using this file instead of directly.
*
* Rename this file to `deploy-config.php` and edit the
* configuration options here instead of directly in `deploy.php`.
* That way, you won't have to edit the configuration again if you download the
* new version of `deploy.php`.
*
* @version 1.3.1
*/
/**
* Protect the script from unauthorized access by using a secret access token.
* If it's not present in the access URL as a GET variable named `sat`
* e.g. deploy.php?sat=Bett...s the script is not going to deploy.
*
* @var string
*/
define('SECRET_ACCESS_TOKEN', 'pplib');
/**
* The address of the remote Git repository that contains the code that's being
* deployed.
* If the repository is private, you'll need to use the SSH address.
*
* @var string
*/
define('REMOTE_REPOSITORY', 'https://github.com/QMCPACK/pseudopotentiallibrary.git');
/**
* The branch that's being deployed.
* Must be present in the remote repository.
*
* @var string
*/
define('BRANCH', 'main');
/**
* The location that the code is going to be deployed to.
* Don't forget the trailing slash!
*
* @var string Full path including the trailing slash
*/
define('TARGET_DIR', '/var/www/html/');
/**
* Whether to delete the files that are not in the repository but are on the
* local (server) machine.
*
* !!! WARNING !!! This can lead to a serious loss of data if you're not
* careful. All files that are not in the repository are going to be deleted,
* except the ones defined in EXCLUDE section.
* BE CAREFUL!
*
* @var boolean
*/
define('DELETE_FILES', true);
/**
* The directories and files that are to be excluded when updating the code.
* Normally, these are the directories containing files that are not part of
* code base, for example user uploads or server-specific configuration files.
* Use rsync exclude pattern syntax for each element.
*
* @var serialized array of strings
*/
define('EXCLUDE', serialize(array(
'.git',
)));
/**
* Temporary directory we'll use to stage the code before the update. If it
* already exists, script assumes that it contains an already cloned copy of the
* repository with the correct remote origin and only fetches changes instead of
* cloning the entire thing.
*
* @var string Full path including the trailing slash
*/
define('TMP_DIR', '/tmp/spgd-' . md5(REMOTE_REPOSITORY) . '/');
/**
* Whether to remove the TMP_DIR after the deployment.
* It's useful NOT to clean up in order to only fetch changes on the next
* deployment.
*/
define('CLEAN_UP', true);
/**
* Output the version of the deployed code.
*
* @var string Full path to the file name
*/
define('VERSION_FILE', TMP_DIR . 'VERSION');
/**
* Time limit for each command.
*
* @var int Time in seconds
*/
define('TIME_LIMIT', 30);
/**
* OPTIONAL
* Backup the TARGET_DIR into BACKUP_DIR before deployment.
*
* @var string Full backup directory path e.g. `/tmp/`
*/
define('BACKUP_DIR', false);
/**
* OPTIONAL
* Whether to invoke composer after the repository is cloned or changes are
* fetched. Composer needs to be available on the server machine, installed
* globaly (as `composer`). See http://getcomposer.org/doc/00-intro.md#globally
*
* @var boolean Whether to use composer or not
* @link http://getcomposer.org/
*/
define('USE_COMPOSER', false);
/**
* OPTIONAL
* The options that the composer is going to use.
*
* @var string Composer options
* @link http://getcomposer.org/doc/03-cli.md#install
*/
define('COMPOSER_OPTIONS', '--no-dev');
/**
* OPTIONAL
* The COMPOSER_HOME environment variable is needed only if the script is
* executed by a system user that has no HOME defined, e.g. `www-data`.
*
* @var string Path to the COMPOSER_HOME e.g. `/tmp/composer`
* @link https://getcomposer.org/doc/03-cli.md#composer-home
*/
define('COMPOSER_HOME', false);
/**
* OPTIONAL
* Email address to be notified on deployment failure.
*
* @var string A single email address, or comma separated list of email addresses
* e.g. 'someone@example.com' or 'someone@example.com, someone-else@example.com, ...'
*/
define('EMAIL_ON_ERROR', 'drupalteam@ornl.gov, kentpr@ornl.gov');