-
Notifications
You must be signed in to change notification settings - Fork 0
/
hooker.conf.example-clean.php
62 lines (57 loc) · 3.05 KB
/
hooker.conf.example-clean.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
<?php
/**
* Hooker Configuration File
*/
return [
'ip_whitelist' => [],
'sites' => [
// (Webhook example: http://deploy.mysite.com/hooker.php?app=first_application&key=SomeRandomWordThatMustBePresentInTheKeyParam&init=true).
'first_application' => [
'key' => 'SomeRandomStringThatMustBePresentInTheKeyParam',
'local_repo' => '/var/www/html-website',
'git_ssh_key_path' => '/var/www/.ssh/html-website.deploykey',
// If using Conductor, you can easily generate one by running `conductor genkey {appname}`
'is_github' => true,
'disable_init' => false,
'branch' => 'master',
//'init_commands' => [
// 'rm -Rf {{local-repo}}/* && rm -Rf {{local-repo}}/.* > /dev/null',
// '{{git-ssh-key}}{{git-bin}} -C {{local-repo}} clone {{remote-repo}} .',
// '{{git-bin}} -C {{local-repo}} checkout {{branch}}',
//],
'pre_commands' => [
'{{php-bin}} {{local-repo}}/artisan down',
'{{php-bin}} {{local-repo}}/artisan config:clear',
],
//'deploy_commands' => [
// 'cd {{local-repo}} && {{git-bin}} reset --hard HEAD && {{git-ssh-key}}{{git-bin}} pull',
//],
'post_commands' => [
'cd {{local-repo}} && {{php-bin}} {{composer-bin}} install --no-dev --no-progress --prefer-dist --optimize-autoloader',
'chmod 755 {{local-repo}}/storage',
'{{php-bin}} {{local-repo}}/artisan migrate --force',
'{{php-bin}} {{local-repo}}/artisan config:cache',
'{{php-bin}} {{local-repo}}/artisan cache:clear',
'{{php-bin}} {{local-repo}}/artisan route:cache',
"{{php-bin}} {{local-repo}}/artisan view:cache",
'{{php-bin}} {{local-repo}}/artisan up',
//'{{php-bin}} {{local-repo}}/artisan queue:restart', // Using a job queue? Restart it so it uses the latest version of your code!
//'{{php-bin}} {{local-repo}}/artisan horizon:terminate', // Using Horizon for your queues instead??
],
],
// (Webhook example: http://deploy.mysite.com/hooker.php?app=second_application&key=VgUjbEIPbOCpiRQa2UHjqiXcmbE8eIht)
// This example uses a local ``.hooker.json`` for it's workflow configuration (this must be present in the root of your Git repository).
'second_application' => [
'key' => 'VgUjbEIPbOCpiRQa2UHjqiXcmbE8eIht',
'local_repo' => '@conductor',
// This will auto-resolve to /var/conductor/applications/second_application
'git_ssh_key_path' => '@conductor',
// This will auto-resolve and use the private key at /var/www/.ssh/second_application.deploykey
'is_github' => false,
'disable_init' => true,
// Prevent people (if they have the webhook URL) from re-initiating your application.
'branch' => 'deploy-prod',
'use_json' => 'true',
],
],
];