aklump/live-dev-porter

Simplifies the management and transfer of assets between website environments.

0.0.152 2024-03-20 21:12 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.

Quick Start

  1. Require in your project using composer require aklump/live-dev-porter
  2. Ensure execute permissions: chmod u+x ./vendor/bin/ldp
  3. Initialize your project using ./vendor/bin/ldp init
  4. (To migrate from Loft Deploy jump below...)
  5. Open .live_dev_porter/config.yml and modify as needed.
  6. Ensure config.local.yml is ignored by your SCM!
  7. Open .live_dev_porter/config.local.yml and define the correct local and remote environment IDs as defined in config.yml.
  8. 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.

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

Usage

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

Contributing

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