Last active
November 3, 2023 07:52
-
-
Save simesy/50bcfda050f31d794c6bc1b562010944 to your computer and use it in GitHub Desktop.
Drop-in govcms PaaS settings.local.php and lando/ddev support
This file contains 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
# Add to .gitignore. | |
.lando.yml | |
.ddev | |
.vscode | |
# Drush aliases can be used by anyone, but you might not want to add to repo. | |
# drush/sites/self.sites.yml |
This file contains 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.yml | |
name: foobar | |
recipe: drupal10 | |
config: | |
webroot: web | |
via: nginx | |
build: | |
- "composer install --ignore-platform-reqs" | |
tooling: | |
drush: | |
DRUSH_OPTIONS_URI: "https://foobar.lndo.site" |
This file contains 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
# .ddev/config.yml | |
name: foobar | |
type: drupal10 | |
docroot: web | |
php_version: "8.1" | |
webserver_type: nginx-fpm | |
xdebug_enabled: false | |
additional_hostnames: [] | |
additional_fqdns: [] | |
database: | |
type: mariadb | |
version: "10.4" | |
use_dns_when_possible: true | |
composer_version: "2" | |
web_environment: | |
- DRUSH_OPTIONS_URI=https://foobar.ddev.site/ | |
nodejs_version: "18" | |
disable_settings_management: true |
This file contains 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
# drush/sites/self.site.yml | |
# Note that you can run these without starting local. | |
# composer install | |
# ./vendor/bin/drush @dev st | |
prod: | |
root: /app | |
host: ssh-lagoon.govcms.amazee.io | |
user: foobar-master | |
uri: nginx-master-foobar.govcms6.amazee.io | |
ssh: | |
options: -p 30831 | |
tty: false | |
dev: | |
root: /app | |
host: ssh-lagoon.govcms.amazee.io | |
user: foobar-develop | |
uri: nginx-develop-foobar.govcms7.amazee.io | |
ssh: | |
options: -p 30831 | |
tty: false |
This file contains 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
<?php | |
# web/sites/default/settings.local.php | |
/** | |
* This section is only for Lando. | |
*/ | |
if (getenv('LANDO') === 'ON') { | |
$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 section is only for DDev. | |
*/ | |
if (getenv('IS_DDEV_PROJECT') == 'true') { | |
$databases['default']['default'] = [ | |
'driver' => 'mysql', | |
'database' => 'db', | |
'username' => 'db', | |
'password' => 'db', | |
'host' => 'db', | |
'port' => 3306, | |
]; | |
} | |
$settings['container_yamls'][] = $govcms_includes . '/development.services.yml'; | |
$settings['twig_debug'] = TRUE; | |
$config['system.performance']['css']['preprocess'] = FALSE; | |
$config['system.performance']['js']['preprocess'] = FALSE; | |
$config['system.logging']['error_level'] = 'verbose'; | |
// Beware of xdebug slowness. | |
$settings['cache']['bins']['render'] = 'cache.backend.null'; | |
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; | |
$settings['cache']['bins']['page'] = 'cache.backend.null'; | |
// Extreme debugging. | |
// $settings['cache']['bins']['discovery'] = 'cache.backend.null'; | |
// $settings['cache']['bins']['container'] = 'cache.backend.null'; | |
// $settings['cache']['bins']['bootstrap'] = 'cache.backend.null'; | |
error_reporting(E_ALL ^ E_DEPRECATED); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); | |
$settings['update_free_access'] = FALSE; | |
$settings['rebuild_access'] = FALSE; | |
// No config split in this setup. | |
$config['shield.settings']['shield_enable'] = FALSE; | |
$config['clam.settings']['enabled'] = FALSE; | |
$config['login_security.settings']['disable_core_login_error'] = FALSE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment