The directories it will pull down are specified in LOCAL_CRAFT_FILE_DIRS It will also pull down the Craft userphotos and rebrand directories from craft/storage by default. The directories it will pull down are specified in LOCAL_ASSETS_DIRS The pull_assets.sh script pulls down an arbitrary number of asset directories from a remote server, since we keep client-uploadable assets out of the git repo. N.B.: The pull_db.sh script can be used even if the local and remote are on the same server. See Database & Asset Syncing Between Environments in Craft CMS for a detailed writeup. The db dumps that craft-scripts does will exclude tables that are temporary/cache tables that we don't want in our backups/restores, such as the templatecaches table. It backs up your local database before doing the dump. The pull_db.sh script pulls down a database dump from a remote server, and then dumps it into your local database. The above assumes that the current working directory is the project root already. env.sh on your remote server(s) and then add this to your deploy script: If you want to add this to your Forge / DeployBot / Buddy.works deploy script so that caches are auto-cleared on deploy, set up the. It can also clear Redis db caches if LOCAL_REDIS_DB_ID is set, and it can clear FastCGI Cache if LOCAL_FASTCGI_CACHE_DIR is set. The clear_caches.sh script clears the Craft CMS caches by removing all of the craft/storage/runtime/ cache dirs, as well as emptying the craft_templatecaches db table. Note: if you use git, please see the Permissions and Git section below. See Hardening Craft CMS Permissions for a detailed writeup. The set_perms.sh script sets the Craft CMS install file permissions in a strict manner, to assist in hardening Craft CMS installs. env.sh files should work with the latest Craft-Scripts. env.sh file.Ĭraft-Scripts comes with defaults so that even older. To upgrade to a later version of Craft-Scripts, replace the contents of your scripts folder with the newest Craft-Scripts, while preserving your existing. env.sh file into your favorite editor, and replace REPLACE_ME with the appropriate settings. Duplicate the file, and rename it to.Copy the scripts folder into the root directory of your Craft CMS project.gitignore.Ĭraft-Scripts works with both Craft 2.x & Craft 3.x, and has built-in support for both mysql as well as postgres databases. env.sh should be created on each environment where you wish to run the craft-scripts, and it should be excluded from your git repo via. There are several scripts included in craft-scripts, each of which perform different functions. Post comments describing the changes they need to make before you'll accept the PR.Shell scripts to manage database backups, asset backups, file permissions, asset syncing, cache clearing, and database syncing between Craft CMS environments Overview.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |