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

Ensure URL proxy is running #120

Closed proofoftom closed 8 years ago

proofoftom commented 8 years ago

When enabling an environment: checks if the URL proxy container is running. If not then ask the user if they want to create it. If they do then run the url-proxy:enable command.

I moved the confirmation message from the url-proxy:enable command to the environment:enable command with the assumption that if someone is running url-proxy:enable then they likely want the container created.

Fixes #20 and also ensures that the url-proxy:enable command doesn't timeout when downloading the docker image.

Example output:

$ terra env:en dcco 7.x-4.x
URL proxy is not running, would you like to enable it now? [Y/n]
Starting URL proxy...
Hello Terra!
DOCKER > f19a9193f5a58b691c57fe05f609d32d69c1ff30cf20946937fa4b5d21213d78
DOCKER > Starting dcco7x4x_database_1
DOCKER > Starting dcco7x4x_drush_1
DOCKER > Starting dcco7x4x_app_1
DOCKER > Starting dcco7x4x_load_1
Environment enabled!  Available at http://dcco.7.x-4.x.local.computer and http://local.computer:32779
Drush alias file created at /Users/tommy/.drush/dcco.aliases.drushrc.php
Wrote drush alias file to /Users/tommy/.drush/dcco.aliases.drushrc.php
Use drush @terra.dcco.7.x-4.x to access the site.

Running ENABLE app hook...
Sleeping for 5 seconds to let db server start...
jonpugh commented 8 years ago

Wow, so nice! Thanks a ton, @tommycox .