env.inc.template.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. // DEVELOPPEMENT
  3. define("URL_DEV_CMS", "local.cms.cse-invent.com");
  4. define("URL_DEV_EVENTS", "local.events.cse-invent.com");
  5. define("URL_DEV_CONTROL", "local.control.cse-invent.com");
  6. define("URL_DEV_MEDIA", "local.media.cse-invent.com");
  7. define("URL_DEV", array(
  8. URL_DEV_CMS,
  9. URL_DEV_EVENTS,
  10. URL_DEV_CONTROL,
  11. URL_DEV_MEDIA
  12. ));
  13. // RECETTE
  14. define("URL_R7_CMS", "r7.cms.cse-invent.com");
  15. define("URL_R7_EVENTS", "r7.events.cse-invent.com");
  16. define("URL_R7_CONTROL", "r7.control.cse-invent.com");
  17. define("URL_R7_MEDIA", "pp.media.cse-invent.com");
  18. define("URL_R7", array(
  19. URL_R7_CMS,
  20. URL_R7_EVENTS,
  21. URL_R7_CONTROL,
  22. URL_R7_MEDIA
  23. ));
  24. // PRE-PRODUCTION
  25. define("URL_PREPROD_CMS", "pp.cms.cse-invent.com");
  26. define("URL_PREPROD_EVENTS", "pp.events.cse-invent.com");
  27. define("URL_PREPROD_CONTROL", "pp.control.cse-invent.com");
  28. define("URL_PREPROD_MEDIA", "pp.media.cse-invent.com");
  29. define("URL_PREPROD", array(
  30. URL_PREPROD_CMS,
  31. URL_PREPROD_EVENTS,
  32. URL_PREPROD_CONTROL,
  33. URL_PREPROD_MEDIA
  34. ));
  35. // PRODUCTION
  36. define("URL_PROD_CMS", "cms.cse-invent.com");
  37. define("URL_PROD_EVENTS", "events.cse-invent.com");
  38. define("URL_PROD_CONTROL", "control.cse-invent.com");
  39. define("URL_PROD_MEDIA", "media.cse-invent.com");
  40. define("URL_PROD", array(
  41. URL_PROD_CMS,
  42. URL_PROD_EVENTS,
  43. URL_PROD_CONTROL,
  44. URL_PROD_MEDIA
  45. ));
  46. if (in_array($_SERVER['HTTP_HOST'], URL_DEV))
  47. {
  48. define("ENVIRONNEMENT", "DEV");
  49. define("DOMAIN_CMS", URL_DEV_CMS);
  50. define("DOMAIN_EVENTS", URL_DEV_EVENTS);
  51. define("DOMAIN_CONTROL", URL_DEV_CONTROL);
  52. define("DOMAIN_MEDIA", URL_DEV_MEDIA);
  53. define("DOMAIN_API", "https://" . URL_DEV_CMS . "/api/");
  54. define("DOCUMENT_ROOT", "/Users/stanyferer/Sites/cms.cse-invent.com/html/");
  55. define("DOCUMENT_DATAS", "/Users/stanyferer/Sites/cms.cse-invent.com/data/");
  56. define("MAJ", "dev");
  57. define("MAJ_TARGET", "dev");
  58. define("DB_HOST", "");
  59. define("DB_USER", "");
  60. define("DB_PASS", "");
  61. define("DB_NAME", "");
  62. define("SFTP_HOST", "");
  63. define("SFTP_USER", "");
  64. define("SFTP_PASS", "");
  65. define("SFTP_REMOTE", "/import/");
  66. define("JWT_PRIVATE_KEY", "");
  67. define("SCRIPT_IMPORT", "https://www.cse-invent.com/gestion/test/util_import_auto_optim.php");
  68. define("SCRIPT_RAPPORT_IMPORT", "https://www.cse-invent.com/gestion/test/util_form_import_auto.php?type=historique");
  69. define("ALERT_AUTHENTICATOR", FALSE);
  70. define("WHITE_IP", [
  71. "::1", // LocalHost
  72. "127.0.0.1", // LocalHost
  73. ]);
  74. }
  75. elseif (in_array($_SERVER['HTTP_HOST'], URL_R7))
  76. {
  77. define("ENVIRONNEMENT", "R7");
  78. define("DOMAIN_CMS", URL_R7_CMS);
  79. define("DOMAIN_EVENTS", URL_R7_EVENTS);
  80. define("DOMAIN_CONTROL", URL_R7_CONTROL);
  81. define("DOMAIN_MEDIA", URL_R7_MEDIA);
  82. define("DOMAIN_API", "https://" . URL_R7_CMS . "/api/");
  83. define("DOCUMENT_ROOT", "/var/www/r7.cms.cse-invent.com/");
  84. define("DOCUMENT_DATAS", "/mnt/disk/r7.cms.cse-invent.com/");
  85. define("MAJ", "r7");
  86. define("MAJ_TARGET", "dev");
  87. define("DB_HOST", "");
  88. define("DB_USER", "");
  89. define("DB_PASS", "");
  90. define("DB_NAME", "");
  91. define("SFTP_HOST", "");
  92. define("SFTP_USER", "");
  93. define("SFTP_PASS", "");
  94. define("SFTP_REMOTE", "/import/");
  95. define("JWT_PRIVATE_KEY", "");
  96. define("SCRIPT_IMPORT", "https://www.cse-invent.com/gestion/test/util_import_auto_optim.php");
  97. define("SCRIPT_RAPPORT_IMPORT", "https://www.cse-invent.com/gestion/test/util_form_import_auto.php?type=historique");
  98. define("ALERT_AUTHENTICATOR", FALSE);
  99. define("WHITE_IP", [
  100. "::1", // LocalHost pour les taches CRON
  101. "193.70.112.102", // IP du serveur pour API
  102. "82.64.116.178", // IP de chez Stany
  103. ]);
  104. }
  105. elseif (in_array($_SERVER['HTTP_HOST'], URL_PREPROD))
  106. {
  107. define("ENVIRONNEMENT", "PREPROD");
  108. define("DOMAIN_CMS", URL_PREPROD_CMS);
  109. define("DOMAIN_EVENTS", URL_PREPROD_EVENTS);
  110. define("DOMAIN_CONTROL", URL_PREPROD_CONTROL);
  111. define("DOMAIN_MEDIA", URL_PREPROD_MEDIA);
  112. define("DOMAIN_API", "https://" . URL_PREPROD_CMS . "/api/");
  113. define("DOCUMENT_ROOT", "/var/www/pp.cms.cse-invent.com/");
  114. define("DOCUMENT_DATAS", "/mnt/disk/pp.cms.cse-invent.com/");
  115. define("MAJ", "preprod");
  116. define("MAJ_TARGET", "r7");
  117. define("DB_HOST", "");
  118. define("DB_USER", "");
  119. define("DB_PASS", "");
  120. define("DB_NAME", "");
  121. define("SFTP_HOST", "");
  122. define("SFTP_USER", "");
  123. define("SFTP_PASS", "");
  124. define("SFTP_REMOTE", "/import/");
  125. define("JWT_PRIVATE_KEY", "");
  126. define("SCRIPT_IMPORT", "https://www.cse-invent.com/gestion/test/util_import_auto_optim.php");
  127. define("SCRIPT_RAPPORT_IMPORT", "https://www.cse-invent.com/gestion/test/util_form_import_auto.php?type=historique");
  128. define("ALERT_AUTHENTICATOR", TRUE);
  129. define("WHITE_IP", NULL);
  130. }
  131. elseif (in_array($_SERVER['HTTP_HOST'], URL_PROD))
  132. {
  133. define("ENVIRONNEMENT", "PROD");
  134. define("DOMAIN_CMS", URL_PROD_CMS);
  135. define("DOMAIN_EVENTS", URL_PROD_EVENTS);
  136. define("DOMAIN_CONTROL", URL_PROD_CONTROL);
  137. define("DOMAIN_MEDIA", URL_PROD_MEDIA);
  138. define("DOMAIN_API", "https://" . URL_PROD_CMS . "/api/");
  139. define("DOCUMENT_ROOT", "/var/www/cms.cse-invent.com/");
  140. define("DOCUMENT_DATAS", "/mnt/disk/cms.cse-invent.com/");
  141. define("MAJ", "prod");
  142. define("MAJ_TARGET", "preprod");
  143. define("DB_HOST", "");
  144. define("DB_USER", "");
  145. define("DB_PASS", "");
  146. define("DB_NAME", "");
  147. define("SFTP_HOST", "");
  148. define("SFTP_USER", "");
  149. define("SFTP_PASS", "");
  150. define("SFTP_REMOTE", "/import/");
  151. define("JWT_PRIVATE_KEY", "");
  152. define("SCRIPT_IMPORT", "https://www.cse-invent.com/gestion/util_import_auto_optim.php");
  153. define("SCRIPT_RAPPORT_IMPORT", "https://www.cse-invent.com/gestion/util_form_import_auto.php?type=historique");
  154. define("ALERT_AUTHENTICATOR", TRUE);
  155. define("WHITE_IP", NULL);
  156. }