rvkolosov

Untitled

Feb 18th, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.45 KB | None | 0 0
  1. <?php
  2.  
  3. return [
  4.  
  5.     /*
  6.     |--------------------------------------------------------------------------
  7.     | Default deployment strategy
  8.     |--------------------------------------------------------------------------
  9.     |
  10.     | This option defines which deployment strategy to use by default on all
  11.     | of your hosts. Laravel Deployer provides some strategies out-of-box
  12.     | for you to choose from explained in detail in the documentation.
  13.     |
  14.     | Supported: 'basic', 'firstdeploy', 'local', 'pull'.
  15.     |
  16.     */
  17.  
  18.     'default' => 'basic',
  19.  
  20.     /*
  21.     |--------------------------------------------------------------------------
  22.     | Custom deployment strategies
  23.     |--------------------------------------------------------------------------
  24.     |
  25.     | Here, you can easily set up new custom strategies as a list of tasks.
  26.     | Any key of this array are supported in the `default` option above.
  27.     | Any key matching Laravel Deployer's strategies overrides them.
  28.     |
  29.     */
  30.  
  31.     'strategies' => [
  32.         //
  33.     ],
  34.  
  35.     /*
  36.     |--------------------------------------------------------------------------
  37.     | Hooks
  38.     |--------------------------------------------------------------------------
  39.     |
  40.     | Hooks let you customize your deployments conveniently by pushing tasks
  41.     | into strategic places of your deployment flow. Each of the official
  42.     | strategies invoke hooks in different ways to implement their logic.
  43.     |
  44.     */
  45.  
  46.     'hooks' => [
  47.         // Right before we start deploying.
  48.         'start' => [
  49.             //
  50.         ],
  51.  
  52.         // Code and composer vendors are ready but nothing is built.
  53.         'build' => [
  54.             'npm:install',
  55.         ],
  56.  
  57.         // Deployment is done but not live yet (before symlink)
  58.         'ready' => [
  59.             'artisan:storage:link',
  60.             'artisan:view:clear',
  61.             'artisan:cache:clear',
  62.             'artisan:config:cache',
  63.             'artisan:migrate',
  64.             'artisan:migrate:relations',
  65.         ],
  66.  
  67.         // Deployment is done and live
  68.         'done' => [
  69.             'artisan:horizon:publish',
  70.             'chown:www-data',
  71.             'fpm:reload',
  72.             'artisan:horizon:terminate',
  73.         ],
  74.  
  75.         // Deployment succeeded.
  76.         'success' => [
  77.             //
  78.         ],
  79.  
  80.         // Deployment failed.
  81.         'fail' => [
  82.             'chown:www-data',
  83.             'fpm:reload',
  84.             'artisan:horizon:terminate',
  85.         ],
  86.  
  87.         // After a deployment has been rolled back.
  88.         'rollback' => [
  89.             'chown:www-data',
  90.             'fpm:reload',
  91.             'artisan:horizon:terminate',
  92.         ],
  93.     ],
  94.  
  95.     /*
  96.     |--------------------------------------------------------------------------
  97.     | Deployment options
  98.     |--------------------------------------------------------------------------
  99.     |
  100.     | Options follow a simple key/value structure and are used within tasks
  101.     | to make them more configurable and reusable. You can use options to
  102.     | configure existing tasks or to use within your own custom tasks.
  103.     |
  104.     */
  105.  
  106.     'options' => [
  107.         'application' => env('APP_NAME', 'Laravel'),
  108.         'repository' => '[email protected]:ip-team/cpov-laravel.git',
  109.         'php_fpm_service' => 'php7.4-fpm',
  110.         'shared_files' => [
  111.             '.env',
  112.             'public/media',
  113.         ],
  114.     ],
  115.  
  116.     /*
  117.     |--------------------------------------------------------------------------
  118.     | Hosts
  119.     |--------------------------------------------------------------------------
  120.     |
  121.     | Here, you can define any domain or subdomain you want to deploy to.
  122.     | You can provide them with roles and stages to filter them during
  123.     | deployment. Read more about how to configure them in the docs.
  124.     |
  125.     */
  126.  
  127.     'hosts' => [
  128.         env('DEPLOY_HOST') => [
  129.             'deploy_path' => '/var/www/cpov-laravel',
  130.             'user' => 'root',
  131.         ],
  132.     ],
  133.  
  134.     /*
  135.     |--------------------------------------------------------------------------
  136.     | Localhost
  137.     |--------------------------------------------------------------------------
  138.     |
  139.     | This localhost option give you the ability to deploy directly on your
  140.     | local machine, without needing any SSH connection. You can use the
  141.     | same configurations used by hosts to configure your localhost.
  142.     |
  143.     */
  144.  
  145.     'localhost' => [
  146.         //
  147.     ],
  148.  
  149.     /*
  150.     |--------------------------------------------------------------------------
  151.     | Include additional Deployer recipes
  152.     |--------------------------------------------------------------------------
  153.     |
  154.     | Here, you can add any third party recipes to provide additional tasks,
  155.     | options and strategies. Therefore, it also allows you to create and
  156.     | include your own recipes to define more complex deployment flows.
  157.     |
  158.     */
  159.  
  160.     'include' => [
  161.         'recipe/chown.php',
  162.         'recipe/artisan.php',
  163.     ],
  164.  
  165.     /*
  166.     |--------------------------------------------------------------------------
  167.     | Use a custom Deployer file
  168.     |--------------------------------------------------------------------------
  169.     |
  170.     | If you know what you are doing and want to take complete control over
  171.     | Deployer's file, you can provide its path here. Note that, without
  172.     | this configuration file, the root's deployer file will be used.
  173.     |
  174.     */
  175.  
  176.     'custom_deployer_file' => false,
  177.  
  178. ];
  179.  
Advertisement
Add Comment
Please, Sign In to add comment