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

Add .lagoon.env environment files. #1

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .lagoon.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DRUPAL_SHIELD_USER=
DRUPAL_SHIELD_PASS=
2 changes: 2 additions & 0 deletions .lagoon.env.master
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DRUPAL_SHIELD_USER=
DRUPAL_SHIELD_PASS=
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ x-environment:
LAGOON_PROJECT: *lagoon-project
LAGOON_ROUTE: &default-url ${LOCALDEV_URL:-http://govcms7-paas.docker.amazee.io}
X_FRAME_OPTIONS: ${X_FRAME_OPTIONS:-SameOrigin}
DRUPAL_SHIELD_USER: ${DRUPAL_SHIELD_USER}
DRAUPL_SHIELD_PASS: ${DRAUPL_SHIELD_PASS}

services:

Expand Down
7 changes: 7 additions & 0 deletions docroot/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ public function __toString() {
$conf['clamav_mode'] = 1;
$conf['clamav_executable_path'] = '/usr/bin/clamscan';

// Ensure that shield is configured correctly.
if (getenv('LAGOON') && (getenv('DRUPAL_SHIELD_USER') && getenv('DRUPAL_SHIELD_PASS'))) {
$conf['shield_enabled'] = 1;
$conf['shield_user'] = getenv('DRUPAL_SHIELD_USER');
$conf['shield_pass'] = getenv('DRUPAL_SHIELD_PASS');
}

// Loading settings for all environment types.
if (file_exists(__DIR__ . '/all.settings.php')) {
include __DIR__ . '/all.settings.php';
Expand Down