Skip to content

Commit

Permalink
Create .ddev/.gitignore on ddev start *and* config (for teams), fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaseberle authored and rfay committed Jan 9, 2020
1 parent afdab4f commit 2cd04cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/users/faq.md
Expand Up @@ -15,3 +15,6 @@
* **Can different projects communicate with each other?** Yes, this is commonly required for situations like Drupal migrations. For the web container to access the db container of another project, use `ddev-<projectname>-db` as the hostname of the other project. For example, in project1, use `mysql ddev-project2-db` to access the db server of project2. For HTTP/S communication you can 1) access the web container of project2 directly with the hostname `ddev-<project2>-web` and port 80 or 443: `curl https://ddev-project2-web` or 2) Access via the ddev router with the official hostname: `curl https://ddev-router -H Host:d7git.ddev.site`.
* **How do I make ddev match my production webserver environment?** You can change the PHP major version (currently 5.6 through 7.4) and choose between nginx+fpm (default and apache+fpm and choose the MariaDB version add [extra services like solr and memcached](extend/additional-services.md). You will not be able to make every detail match your production server, but with PHP version and webserver type you'll be close.
* **How do I completely destroy a project?** Use `ddev delete <project>` to destroy a project. (Also, `ddev stop --remove-data` will do the same thing.) By default, a `ddev snapshot` of your database is taken, but you can skip this, see `ddev delete -h` for options.
* **I don't like the settings files or gitignores that ddev creates. What can I do?** You have a couple of options that work well for most people:
* Use project type "php" instead of the type of your CMS. "php" just means "Don't try to create settings files and such for me.". The "php" type works great for experienced developers.
* "Take over" the settings file or .gitignore by deleting the line "#ddev-generated" in it (and then check in the file). If that line is removed, ddev will not try to replace or change the file.
6 changes: 6 additions & 0 deletions pkg/ddevapp/apptypes.go
Expand Up @@ -88,7 +88,13 @@ func init() {

// CreateSettingsFile creates the settings file (like settings.php) for the
// provided app is the apptype has a settingsCreator function.
// It also preps the ddev directory, including setting up the .ddev gitignore
func (app *DdevApp) CreateSettingsFile() (string, error) {
err := PrepDdevDirectory(filepath.Dir(app.ConfigPath))
if err != nil {
util.Warning("Unable to PrepDdevDiredtory: %v", err)
}

app.SetApptypeSettingsPaths()

// If neither settings file options are set, then don't continue. Return
Expand Down

0 comments on commit 2cd04cf

Please sign in to comment.