Created
March 24, 2021 18:27
-
-
Save vladdancer/c2f33144a0e55c6eeee2f5be6d8373da to your computer and use it in GitHub Desktop.
Lando, get external container port to connect to the DB. #lando #drupal #docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lando info --filter service=database | |
# or | |
lando info --format=json | jq '.[] | select(.service=="database") | .external_connection.port ' | |
# to suppress nodejs warnings run lando with | |
# see https://github.com/lando/lando/issues/2928 | |
node --no-warnings /path/to/lando.js info --format=json | jq '.[] | select(.service=="database") | .external_connection.port' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment