terra-ops / terra-cli

The Terra Command Line Interface
http://terra.readthedocs.org
GNU General Public License v2.0
48 stars 17 forks source link

Interactive .terra.yml creation #118

Closed proofoftom closed 8 years ago

proofoftom commented 8 years ago

Implementation of #115

Asks the user if they want to create a .terra.yml if none exists, then gathers necessary info (currently only document_root) to generate the file.

$ terra env:add dcco 7.x-4.x
Environment Source Code Path: (/Users/tommy/Apps/dcco/7.x-4.x)
Git branch or tag? [default branch] 7.x-4.x
No .terra.yml found. Would you like to create one? [y\N] y
Please enter the relative path to your exposed web files: [.] docroot
.terra.yml has been created in the repository root.

The result looks like this:

.terra.yml

# The relative path to your exposed web files.
document_root: docroot

This will then correctly set the app container's DOCUMENT_ROOT environment variable when enabling the environment.

jonpugh commented 8 years ago

This is fantastic, @tommycox, thank you so much!

I'm going to go ahead and merge it now, but I think we should go ahead and offer to commit it and push it as well!

I really appreciate this work!