config.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. use Rocketeer\Services\Connections\ConnectionsHandler;
  3. return [
  4. // The name of the application to deploy
  5. // This will create a folder of the same name in the root directory
  6. // configured above, so be careful about the characters used
  7. 'application_name' => 'config-service',
  8. // Plugins
  9. ////////////////////////////////////////////////////////////////////
  10. // The plugins to load
  11. 'plugins' => [// 'Rocketeer\Plugins\Slack\RocketeerSlack',
  12. ],
  13. // Logging
  14. ////////////////////////////////////////////////////////////////////
  15. // The schema to use to name log files
  16. 'logs' => function (ConnectionsHandler $connections) {
  17. return sprintf('%s-%s-%s.log', $connections->getConnection(), $connections->getStage(), date('Ymd'));
  18. },
  19. // Remote access
  20. //
  21. // You can either use a single connection or an array of connections
  22. ////////////////////////////////////////////////////////////////////
  23. // The default remote connection(s) to execute tasks on
  24. 'default' => ['beta'],
  25. // The various connections you defined
  26. // You can leave all of this empty or remove it entirely if you don't want
  27. // to track files with credentials : Rocketeer will prompt you for your credentials
  28. // and store them locally
  29. 'connections' => [
  30. 'beta' => [
  31. 'host' => '47.92.174.125:2345',
  32. 'username' => 'root',
  33. 'password' => '',
  34. 'key' => '/root/.ssh/id_rsa',
  35. 'keyphrase' => '',
  36. 'agent' => '',
  37. 'db_role' => true,
  38. ],
  39. 'production' => [
  40. 'host' => '47.92.30.243:2345',
  41. 'username' => 'root',
  42. 'password' => '',
  43. 'key' => '/root/.ssh/id_rsa',
  44. 'keyphrase' => '',
  45. 'agent' => '',
  46. ],
  47. ],
  48. /*
  49. * In most multiserver scenarios, migrations must be run in an exclusive server.
  50. * In the event of not having a separate database server (in which case it can
  51. * be handled through connections), you can assign a 'db_role' => true to the
  52. * server's configuration and it will only run the migrations in that specific
  53. * server at the time of deployment.
  54. */
  55. 'use_roles' => false,
  56. // Contextual options
  57. //
  58. // In this section you can fine-tune the above configuration according
  59. // to the stage or connection currently in use.
  60. // Per example :
  61. // 'stages' => array(
  62. // 'staging' => array(
  63. // 'scm' => array('branch' => 'staging'),
  64. // ),
  65. // 'production' => array(
  66. // 'scm' => array('branch' => 'master'),
  67. // ),
  68. // ),
  69. ////////////////////////////////////////////////////////////////////
  70. 'on' => [
  71. // Stages configurations
  72. 'stages' => [],
  73. // Connections configuration
  74. 'connections' => [
  75. 'production' => [
  76. 'remote' => [
  77. 'root_directory' => '/data/wwwroot/uptoyo/api'
  78. ],
  79. 'scm' => [
  80. 'branch' => 'release'
  81. ]
  82. ]
  83. ],
  84. ],
  85. ];