Creating Scaffold Files from the Local Environment
You want to copy un-versioned local files, e.g. .htaccess, settings.local.php, .env to a source-controlled folder called install/, at the same time removing any secrets. You do this so that these files can be source-controlled and used in installation processes. These are sometimes called scaffold files.
This is how you do that.
- Configure a second, local environment, e.g.
local. - Set
write_accesstofalse. - Setup
filesas you would a normal remote, that is, with paths to the original files. - Do not define
databasesbecause this will ensure only files are pulled, even without usingpull -f. - Now run
ldp pull localto copy the files; notice how you specify the "remote" in the CLI argument.
_.live_devporter/config.yml
environments:
dev:
label: ITLS
write_access: true
plugin: default
base_path: /alpha/bravo/app
command_workflows:
pull: develop
databases:
drupal:
plugin: lando
service: database
files:
install: install
public: web/sites/default/files
private: private/default/files
local:
label: ITLS
write_access: false
plugin: default
base_path: /alpha/bravo/app
files:
install: ./