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

Create local drush aliases #26

Closed jonpugh closed 9 years ago

jonpugh commented 9 years ago

Now that terra/drush has an SSH server in it, we can access the site with a local drush alias. Here's one I setup manually for a project:

~/.drush/appname.aliases.drushrc.php:

<?php
$aliases['environmentname'] = array(
  'uri' => 'environment.url',
  'root' => '/var/www/html',
  'remote-host' => 'environment.url',
  'remote-user' => 'root',
  'ssh-options' => '-p 32771',
);

Yes, I know we probably shouldn't let users login as root. Lets make another issue for that.

jonpugh commented 9 years ago

FYI I couldn't get the URL Proxy container to work with two different containers for two different ports.

The 80 port must go to the LOAD container, port 22 (or 2222 probably) should go to the DRUSH container, but our URL proxy (/jwilder/nginx-proxy) doesn't support this.

This means that we will have to re-write the drush alias file everytime we enable an environment, as the port changes every time you run docker-compose up