Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDEV should provide database credentials when setting up a project #776

Closed
runeasgar opened this issue Apr 5, 2018 · 6 comments
Closed

Comments

@runeasgar
Copy link

runeasgar commented Apr 5, 2018

What happened (or feature request):

I set up Drupal 8 on DDEV using the relevant quick start documentation, and did not know what to do when Drupal asked me for database credentials.

What you expected to happen:

To either have been provided with, or to not need database credentials.

How to reproduce this:

See above.

Version: Please include the output of ddev version, docker version and the project's .ddev/config.yaml.

$ ddev version
domain	ddev.local
cli   	v0.16.0
web   	drud/nginx-php-fpm-local:v1.2.1
db    	drud/mariadb-local:v0.9.0
dba   	drud/phpmyadmin:v0.2.0
router	drud/ddev-router:v0.5.0
commit	v0.16.0
$ docker version
Client:
 Version:	18.03.0-ce
 API version:	1.37
 Go version:	go1.9.4
 Git commit:	0520e24
 Built:	Wed Mar 21 23:06:22 2018
 OS/Arch:	darwin/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.03.0-ce
  API version:	1.37 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	0520e24
  Built:	Wed Mar 21 23:14:32 2018
  OS/Arch:	linux/amd64
  Experimental:	true
$ cat .ddev/config.yaml
APIVersion: "1"
name: drupal
type: drupal8
docroot: web
php_version: "7.1"
webimage: drud/nginx-php-fpm-local:v1.2.1
dbimage: drud/mariadb-local:v0.9.0
dbaimage: drud/phpmyadmin:v0.2.0
router_http_port: "80"
router_https_port: "443"
provider: default

# Certain ddev commands can be extended to run tasks before or after the ddev
# command is executed.
# See https://ddev.readthedocs.io/en/latest/users/extending-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them.
# hooks:
#   post-import-db:
#     - exec: "drush cr"

Anything else do we need to know:

Basically, I'm asking that the db creds be thrown in my face when starting up the project, rather than having to go to #ddev chat and find out that ddev describe is the command I needed :)

Related source links or issues:

https://ddev.readthedocs.io/en/latest/users/cli-usage/#drupal-8-quickstart

Please use a complexity rating of 1-5 (5 is high) for a feature request. (High complexity implies more PR planning)

1

@rickmanelius
Copy link
Contributor

Hi @runeasgar! Sorry for the pain point. As of v0.16.0, when running ddev config, a DB settings file is generated which then prepopulates this information when using install.php. However, it seems like a lot of people want a simple execution of ddev describe immediately after a ddev start to make this more readily apparent (and you're not the first one to note this!).

Also, this was noted by @BrianGilbert in #733. Linking it only to properly cross-reference the request(s).

@runeasgar
Copy link
Author

I am running v0.16.0.. but the information was not prepopulated.

I do see this line in my command line history, but it does not seem to have worked:
Generating settings.local.php file for database connection.

@runeasgar
Copy link
Author

I confirmed the existence of settings.local.php, and DB creds inside it, but it doesn't look like Drupal paid any attention to it. Here's my command history from that time period:

brew tap drud/ddev && brew install ddev
cd Sites/
mkdir ddev
cd ddev
composer create-project drupal-composer/drupal-project:8.x-dev drupal --stability dev --no-interaction
cd drupal
ddev config
ddev start

.. and shortly thereafter, ddev describe because I needed those database creds.

@rickmanelius
Copy link
Contributor

Hi @runeasgar. This is probably due to the fact that we/ddev needs to do a better job of ensuring the settings.local.php is referenced from settings.php. You and others may have a modified version of settings.php and therefore settings.local.php would get missed. I'll step through that/those scenarios again and see what a proposed set of helper text would be (if it's not already present).

@runeasgar
Copy link
Author

I'm installing Drupal using this command, which is the first recommendation on Drupal.org for installing Drupal with composer (https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#download-core-option-a):

composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction

Hope that helps!

@rfay
Copy link
Member

rfay commented Sep 25, 2018

There haven't been a lot of continued requests on this, and people seem to know about ddev describe, so closing for now. Happy to continue the conversation!

@rfay rfay closed this as completed Sep 25, 2018
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

No branches or pull requests

3 participants