NewBackdropSettings produces a BackdropSettings object with default values.
(app *DdevApp)
| 34 | |
| 35 | // NewBackdropSettings produces a BackdropSettings object with default values. |
| 36 | func NewBackdropSettings(app *DdevApp) *BackdropSettings { |
| 37 | dockerIP, _ := dockerutil.GetDockerIP() |
| 38 | dbPublishedPort, _ := app.GetPublishedPort("db") |
| 39 | |
| 40 | return &BackdropSettings{ |
| 41 | DatabaseName: "db", |
| 42 | DatabaseUsername: "db", |
| 43 | DatabasePassword: "db", |
| 44 | DatabaseHost: "ddev-" + app.Name + "-db", |
| 45 | DatabaseDriver: "mysql", |
| 46 | DatabasePort: GetInternalPort(app, "db"), |
| 47 | HashSalt: util.HashSalt(app.Name), |
| 48 | Signature: nodeps.DdevFileSignature, |
| 49 | SiteSettings: "settings.php", |
| 50 | SiteSettingsDdev: "settings.ddev.php", |
| 51 | DockerIP: dockerIP, |
| 52 | DBPublishedPort: dbPublishedPort, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // createBackdropSettingsFile manages creation and modification of settings.php and settings.ddev.php. |
| 57 | // If a settings.php file already exists, it will be modified to ensure that it includes |
no test coverage detected