Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 739b0fc3ca83bc35b88eaa7680f61c02fc59c361 Mon Sep 17 00:00:00 2001
- Date: Sun, 16 Sep 2018 11:35:54 +1000
- Subject: [PATCH] Move LOCAL_CRAFT_FILES_PATH & REMOTE_CRAFT_FILES_PATH to be
- .env variables to allow for atomic deployments
- ---
- scripts/common/common_env.sh | 3 +--
- scripts/common/defaults.sh | 6 ++++--
- scripts/craft2-example.env.sh | 6 ++++--
- scripts/craft3-example.env.sh | 6 ++++--
- 4 files changed, 13 insertions(+), 8 deletions(-)
- diff --git a/scripts/common/common_env.sh b/scripts/common/common_env.sh
- index 1fff579..c4a20d8 100644
- --- a/scripts/common/common_env.sh
- +++ b/scripts/common/common_env.sh
- @@ -12,8 +12,7 @@
- # @license MIT
- # Craft paths; ; paths should always have a trailing /
- -LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}"${GLOBAL_CRAFT_PATH}storage/"
- -REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}"${GLOBAL_CRAFT_PATH}storage/"
- +
- # Commands to output database dumps, using gunzip -c instead of zcat for MacOS X compatibility
- DB_ZCAT_CMD="gunzip -c"
- diff --git a/scripts/common/defaults.sh b/scripts/common/defaults.sh
- index 9df0777..4a99630 100644
- --- a/scripts/common/defaults.sh
- +++ b/scripts/common/defaults.sh
- @@ -29,6 +29,7 @@ GLOBAL_DB_DRIVER="mysql"
- # Local path constants; paths should always have a trailing /
- LOCAL_ROOT_PATH="REPLACE_ME"
- LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
- +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Local user & group that should own the Craft CMS install
- LOCAL_CHOWN_USER="admin"
- @@ -65,8 +66,8 @@ LOCAL_REDIS_DB_ID=""
- # Local database constants; default port for mysql is 3306, default port for postgres is 5432
- LOCAL_DB_NAME="REPLACE_ME"
- -LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_USER="REPLACE_ME"
- +LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_HOST="localhost"
- LOCAL_DB_PORT="3306"
- LOCAL_DB_SCHEMA="public"
- @@ -96,14 +97,15 @@ REMOTE_SSH_PORT="22"
- # Remote path constants; paths should always have a trailing /
- REMOTE_ROOT_PATH="REPLACE_ME"
- REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
- +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Should we connect to the remote database server via ssh?
- REMOTE_DB_USING_SSH="yes"
- # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
- REMOTE_DB_NAME="REPLACE_ME"
- -REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_USER="REPLACE_ME"
- +REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_HOST="localhost"
- REMOTE_DB_PORT="3306"
- REMOTE_DB_SCHEMA="public"
- diff --git a/scripts/craft2-example.env.sh b/scripts/craft2-example.env.sh
- index 5e0e9ab..b3427f7 100755
- --- a/scripts/craft2-example.env.sh
- +++ b/scripts/craft2-example.env.sh
- @@ -31,6 +31,7 @@ GLOBAL_DB_DRIVER="mysql"
- # Local path constants; paths should always have a trailing /
- LOCAL_ROOT_PATH="REPLACE_ME"
- LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
- +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Local user & group that should own the Craft CMS install
- LOCAL_CHOWN_USER="admin"
- @@ -67,8 +68,8 @@ LOCAL_REDIS_DB_ID=""
- # Local database constants; default port for mysql is 3306, default port for postgres is 5432
- LOCAL_DB_NAME="REPLACE_ME"
- -LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_USER="REPLACE_ME"
- +LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_HOST="localhost"
- LOCAL_DB_PORT="3306"
- LOCAL_DB_SCHEMA="public"
- @@ -101,11 +102,12 @@ REMOTE_DB_USING_SSH="yes"
- # Remote path constants; paths should always have a trailing /
- REMOTE_ROOT_PATH="REPLACE_ME"
- REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
- +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
- REMOTE_DB_NAME="REPLACE_ME"
- -REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_USER="REPLACE_ME"
- +REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_HOST="localhost"
- REMOTE_DB_PORT="3306"
- REMOTE_DB_SCHEMA="public"
- diff --git a/scripts/craft3-example.env.sh b/scripts/craft3-example.env.sh
- index 0dcc892..9350fc2 100755
- --- a/scripts/craft3-example.env.sh
- +++ b/scripts/craft3-example.env.sh
- @@ -31,6 +31,7 @@ GLOBAL_DB_DRIVER="mysql"
- # Local path constants; paths should always have a trailing /
- LOCAL_ROOT_PATH="REPLACE_ME"
- LOCAL_ASSETS_PATH=${LOCAL_ROOT_PATH}"REPLACE_ME"
- +LOCAL_CRAFT_FILES_PATH=${LOCAL_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Local user & group that should own the Craft CMS install
- LOCAL_CHOWN_USER="admin"
- @@ -67,8 +68,8 @@ LOCAL_REDIS_DB_ID=""
- # Local database constants; default port for mysql is 3306, default port for postgres is 5432
- LOCAL_DB_NAME="REPLACE_ME"
- -LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_USER="REPLACE_ME"
- +LOCAL_DB_PASSWORD="REPLACE_ME"
- LOCAL_DB_HOST="localhost"
- LOCAL_DB_PORT="3306"
- LOCAL_DB_SCHEMA="public"
- @@ -101,11 +102,12 @@ REMOTE_DB_USING_SSH="yes"
- # Remote path constants; paths should always have a trailing /
- REMOTE_ROOT_PATH="REPLACE_ME"
- REMOTE_ASSETS_PATH=${REMOTE_ROOT_PATH}"REPLACE_ME"
- +REMOTE_CRAFT_FILES_PATH=${REMOTE_ROOT_PATH}${GLOBAL_CRAFT_PATH}"storage/"
- # Remote database constants; default port for mysql is 3306, default port for postgres is 5432
- REMOTE_DB_NAME="REPLACE_ME"
- -REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_USER="REPLACE_ME"
- +REMOTE_DB_PASSWORD="REPLACE_ME"
- REMOTE_DB_HOST="localhost"
- REMOTE_DB_PORT="3306"
- REMOTE_DB_SCHEMA="public"
- --
- 2.17.2 (Apple Git-113)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement