Skip to content

Conversation

@lynnschumann
Copy link
Contributor

No description provided.

mrossi113 and others added 29 commits January 3, 2020 09:39
…. Move environment config from docker directory to .env
@lynnschumann lynnschumann requested a review from jlandfried as a code owner May 4, 2020 19:51
Blackfire in Lando (alternate approach)
Copy link
Contributor

@rbayliss rbayliss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments below. The big one is the rename of the .env directory to .lando (or something else). In general, this PR takes us halfway - it gets Lando set up for local development, but still runs docker-compose in CircleCI. That's ok - I think it'd be fine to figure out Lando in circle as a future step.

echo "
Refresh your local environment from Pantheon.
Options:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file needed anymore? We can just use lando pull now, right?

# * TERMINUS_MACHINE_TOKEN
#
# It also depends on the following environment variables declared in docker/drupal.env:
# It also depends on the following environment variables declared in .env/drupal.env:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should use .env as a directory, because it prevents us from ever using a .env file. In #111, we discussed moving this into .lando instead.

#
# * TERMINUS_SITE
# * TERMINUS_SOURCE_ENVIRONMENT
# * TERMINUS_ENV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a compelling reason to rename this variable? If not, I'd prefer to leave it as TERMINUS_SOURCE_ENVIRONMENT for backward compatibility reasons.

@@ -0,0 +1,12 @@
<?php

$databases['default']['default'] = array (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know these are the lando defaults, but for flexibility, I think we should use this instead:

$lando_info = json_decode(getenv('LANDO_INFO'), TRUE);
  $databases['default']['default'] = [
    'driver' => 'mysql',
    'database' => $lando_info['database']['creds']['database'],
    'username' => $lando_info['database']['creds']['user'],
    'password' => $lando_info['database']['creds']['password'],
    'host' => $lando_info['database']['internal_connection']['host'],
    'port' => $lando_info['database']['internal_connection']['port'],
  ];

This will support changing credentials through Lando.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants