Advertisement
Guest User

Untitled

a guest
May 14th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.23 KB | None | 0 0
  1. From 739b0fc3ca83bc35b88eaa7680f61c02fc59c361 Mon Sep 17 00:00:00 2001
  2. Date: Sun, 16 Sep 2018 11:35:54 +1000
  3. Subject: [PATCH] Move LOCAL_CRAFT_FILES_PATH & REMOTE_CRAFT_FILES_PATH to be
  4. .env variables to allow for atomic deployments
  5.  
  6. ---
  7. scripts/common/common_env.sh | 3 +--
  8. scripts/common/defaults.sh | 6 ++++--
  9. scripts/craft2-example.env.sh | 6 ++++--
  10. scripts/craft3-example.env.sh | 6 ++++--
  11. 4 files changed, 13 insertions(+), 8 deletions(-)
  12.  
  13. diff --git a/scripts/common/common_env.sh b/scripts/common/common_env.sh
  14. index 1fff579..c4a20d8 100644
  15. --- a/scripts/common/common_env.sh
  16. +++ b/scripts/common/common_env.sh
  17. @@ -12,8 +12,7 @@
  18. # @license MIT
  19.  
  20. # Craft paths; ; paths should always have a trailing /
  21. -LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}"${GLOBAL_CRAFT_PATH}storage/"
  22. -REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}"${GLOBAL_CRAFT_PATH}storage/"
  23. +
  24.  
  25. # Commands to output database dumps, using gunzip -c instead of zcat for MacOS X compatibility
  26. DB_ZCAT_CMD="gunzip -c"
  27. diff --git a/scripts/common/defaults.sh b/scripts/common/defaults.sh
  28. index 9df0777..4a99630 100644
  29. --- a/scripts/common/defaults.sh
  30. +++ b/scripts/common/defaults.sh
  31. @@ -29,6 +29,7 @@ GLOBAL_DB_DRIVER="mysql"
  32. # Local path constants; paths should always have a trailing /
  33. LOCAL_ROOT_PATH="REPLACE_ME"
  34. LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
  35. +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  36.  
  37. # Local user & group that should own the Craft CMS install
  38. LOCAL_CHOWN_USER="admin"
  39. @@ -65,8 +66,8 @@ LOCAL_REDIS_DB_ID=""
  40.  
  41. # Local database constants; default port for mysql is 3306, default port for postgres is 5432
  42. LOCAL_DB_NAME="REPLACE_ME"
  43. -LOCAL_DB_PASSWORD="REPLACE_ME"
  44. LOCAL_DB_USER="REPLACE_ME"
  45. +LOCAL_DB_PASSWORD="REPLACE_ME"
  46. LOCAL_DB_HOST="localhost"
  47. LOCAL_DB_PORT="3306"
  48. LOCAL_DB_SCHEMA="public"
  49. @@ -96,14 +97,15 @@ REMOTE_SSH_PORT="22"
  50. # Remote path constants; paths should always have a trailing /
  51. REMOTE_ROOT_PATH="REPLACE_ME"
  52. REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
  53. +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  54.  
  55. # Should we connect to the remote database server via ssh?
  56. REMOTE_DB_USING_SSH="yes"
  57.  
  58. # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
  59. REMOTE_DB_NAME="REPLACE_ME"
  60. -REMOTE_DB_PASSWORD="REPLACE_ME"
  61. REMOTE_DB_USER="REPLACE_ME"
  62. +REMOTE_DB_PASSWORD="REPLACE_ME"
  63. REMOTE_DB_HOST="localhost"
  64. REMOTE_DB_PORT="3306"
  65. REMOTE_DB_SCHEMA="public"
  66. diff --git a/scripts/craft2-example.env.sh b/scripts/craft2-example.env.sh
  67. index 5e0e9ab..b3427f7 100755
  68. --- a/scripts/craft2-example.env.sh
  69. +++ b/scripts/craft2-example.env.sh
  70. @@ -31,6 +31,7 @@ GLOBAL_DB_DRIVER="mysql"
  71. # Local path constants; paths should always have a trailing /
  72. LOCAL_ROOT_PATH="REPLACE_ME"
  73. LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
  74. +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  75.  
  76. # Local user & group that should own the Craft CMS install
  77. LOCAL_CHOWN_USER="admin"
  78. @@ -67,8 +68,8 @@ LOCAL_REDIS_DB_ID=""
  79.  
  80. # Local database constants; default port for mysql is 3306, default port for postgres is 5432
  81. LOCAL_DB_NAME="REPLACE_ME"
  82. -LOCAL_DB_PASSWORD="REPLACE_ME"
  83. LOCAL_DB_USER="REPLACE_ME"
  84. +LOCAL_DB_PASSWORD="REPLACE_ME"
  85. LOCAL_DB_HOST="localhost"
  86. LOCAL_DB_PORT="3306"
  87. LOCAL_DB_SCHEMA="public"
  88. @@ -101,11 +102,12 @@ REMOTE_DB_USING_SSH="yes"
  89. # Remote path constants; paths should always have a trailing /
  90. REMOTE_ROOT_PATH="REPLACE_ME"
  91. REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
  92. +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  93.  
  94. # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
  95. REMOTE_DB_NAME="REPLACE_ME"
  96. -REMOTE_DB_PASSWORD="REPLACE_ME"
  97. REMOTE_DB_USER="REPLACE_ME"
  98. +REMOTE_DB_PASSWORD="REPLACE_ME"
  99. REMOTE_DB_HOST="localhost"
  100. REMOTE_DB_PORT="3306"
  101. REMOTE_DB_SCHEMA="public"
  102. diff --git a/scripts/craft3-example.env.sh b/scripts/craft3-example.env.sh
  103. index 0dcc892..9350fc2 100755
  104. --- a/scripts/craft3-example.env.sh
  105. +++ b/scripts/craft3-example.env.sh
  106. @@ -31,6 +31,7 @@ GLOBAL_DB_DRIVER="mysql"
  107. # Local path constants; paths should always have a trailing /
  108. LOCAL_ROOT_PATH="REPLACE_ME"
  109. LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
  110. +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  111.  
  112. # Local user & group that should own the Craft CMS install
  113. LOCAL_CHOWN_USER="admin"
  114. @@ -67,8 +68,8 @@ LOCAL_REDIS_DB_ID=""
  115.  
  116. # Local database constants; default port for mysql is 3306, default port for postgres is 5432
  117. LOCAL_DB_NAME="REPLACE_ME"
  118. -LOCAL_DB_PASSWORD="REPLACE_ME"
  119. LOCAL_DB_USER="REPLACE_ME"
  120. +LOCAL_DB_PASSWORD="REPLACE_ME"
  121. LOCAL_DB_HOST="localhost"
  122. LOCAL_DB_PORT="3306"
  123. LOCAL_DB_SCHEMA="public"
  124. @@ -101,11 +102,12 @@ REMOTE_DB_USING_SSH="yes"
  125. # Remote path constants; paths should always have a trailing /
  126. REMOTE_ROOT_PATH="REPLACE_ME"
  127. REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
  128. +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
  129.  
  130. # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
  131. REMOTE_DB_NAME="REPLACE_ME"
  132. -REMOTE_DB_PASSWORD="REPLACE_ME"
  133. REMOTE_DB_USER="REPLACE_ME"
  134. +REMOTE_DB_PASSWORD="REPLACE_ME"
  135. REMOTE_DB_HOST="localhost"
  136. REMOTE_DB_PORT="3306"
  137. REMOTE_DB_SCHEMA="public"
  138. --
  139. 2.17.2 (Apple Git-113)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement