aklump/live-dev-porter

Simplifies the management and transfer of assets between website environments.

0.0.172 2024-09-13 20:32 UTC

README

live_dev_porter

Summary

Simplifies the management and transfer of assets between website environments.

Visit https://aklump.github.io/live_dev_porter for full documentation.

Install with Composer

  1. Require this package:

    composer require aklump/live-dev-porter:^0.0
    

Quick Start

  1. Ensure execute permissions: chmod u+x ./vendor/bin/ldp
  2. Initialize your project using ./vendor/bin/ldp init
  3. (To migrate from Loft Deploy jump below...)
  4. Open .live_dev_porter/config.yml and modify as needed.
  5. Ensure .live_dev_porter/config.local.yml is ignored by your SCM!
  6. Open .live_dev_porter/config.local.yml and define the correct local and remote environment IDs as defined in config.yml.
  7. Run ./vendor/bin/ldp configtest and work through any failed tests.

Migrating from Loft Deploy?

  1. rm .live_dev_porter/config*
  2. ./vendor/bin/ldp config-migrate .loft_deploy
  3. Rewrite any hooks as processors.
  4. Return to where you left off above.

Optional Shorthand ldp instead of ./vendor/bin/ldp

Option A: $PATH

This option has the advantage that any other composer binary in your project will be executable as well.

  1. Add /path/to/project/root/vendor/bin to your $PATH.

~/.bash_profile

PATH="/path/to/project/root/vendor/bin/ldp:$PATH"

Option B: alias

This option is singularly focused in terms of what it affects.

~/.bash_profile

  1. Add an alias called ldp that points to /path/to/project/root/vendor/bin/ldp.
alias ldp="/path/to/project/root/vendor/bin/ldp"

Both Options Continued

  1. Type ldp to test if it worked... you should see available commands
  2. Now use ldp from anywhere within your project, instead of ./vendor/bin/ldp from the root.
  3. 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.

Quick Start Remote

  1. Deploy your code to your remote server.
  2. On the remote server type ./vendor/bin/ldp config -l

Installation

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}

Configuration Files

Refer to the file(s) for documentation about configuration options.

Usage

  • To see all commands use ./vendor/bin/ldp

Contributing

If you find this project useful... please consider making a donation.