Simplifies the management and transfer of assets between website environments.
Visit https://aklump.github.io/live_dev_porter for full documentation.
-
Require this package:
composer require aklump/live-dev-porter:^0.0
- Ensure execute permissions:
chmod u+x ./vendor/bin/ldp - Initialize your project using
./vendor/bin/ldp init - (To migrate from Loft Deploy jump below...)
- Open .live_dev_porter/config.yml and modify as needed.
- Ensure .live_dev_porter/config.local.yml is ignored by your SCM!
- Open .live_dev_porter/config.local.yml and define the correct
localandremoteenvironment IDs as defined in config.yml. - Run
./vendor/bin/ldp configtestand work through any failed tests.
rm .live_dev_porter/config*./vendor/bin/ldp config-migrate .loft_deploy- Rewrite any hooks as processors.
- Return to where you left off above.
This option has the advantage that any other composer binary in your project will be executable as well.
- Add /path/to/project/root/vendor/bin to your
$PATH.
~/.bash_profile
PATH="/path/to/project/root/vendor/bin/ldp:$PATH"This option is singularly focused in terms of what it affects.
~/.bash_profile
- Add an alias called ldp that points to /path/to/project/root/vendor/bin/ldp.
alias ldp="/path/to/project/root/vendor/bin/ldp"- Type
ldpto test if it worked... you should see available commands - Now use
ldpfrom anywhere within your project, instead of./vendor/bin/ldpfrom the root. - Don't worry if you have more than one project using Live Dev Porter because this alias will work for multiple projects as long as they use the same version, and usually even if the versions differ.
- Deploy your code to your remote server.
- On the remote server type
./vendor/bin/ldp config -l
The installation script above will generate the following structure where . is your repository root.
.
└── .live_dev_porter
│ ├── config.local.yml
│ └── config.yml
└── {public web root}
Refer to the file(s) for documentation about configuration options.
| Filename | Description | VCS |
|---|---|---|
| .live_dev_porter/config.yml | Configuration shared across all server environments: prod, staging, dev | yes |
| .live_dev_porter/config.local.yml | Configuration overrides for a single environment; not version controlled. | no |
- To see all commands use
./vendor/bin/ldp
