Skip to content

Commit

Permalink
feat: refactor local secrets handling per pantheon-secrets-sdk instru…
Browse files Browse the repository at this point in the history
…ctions
  • Loading branch information
vinmassaro committed Oct 13, 2023
1 parent 18b850c commit cf4ccc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Ignore SimpleTest multi-site environment.
/web/sites/simpletest


# Ignore custom modules managed by Composer.
#
# When a development team creates one or more custom modules that
Expand Down Expand Up @@ -130,3 +129,6 @@ web/profiles/custom/yalesites_profile/vendor/
/atomic
/component-library-twig
/tokens

# Secrets for local use
secrets.json
1 change: 1 addition & 0 deletions .lando.local.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ services:
overrides:
environment:
COMPOSER_PROCESS_TIMEOUT: 1800
CUSTOMER_SECRETS_FAKE_FILE: /app/secrets.json
# This is needed to expose the reverse proxy to the xdebug port (9003)
xdebug: true
6 changes: 2 additions & 4 deletions scripts/local/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ fi
# Start lando and create containers.
lando start

# Generate secrets file and copy it into the appserver container.
# Generate local secrets file.
terminus plugin:install pantheon-systems/terminus-secrets-manager-plugin
terminus secret:site:local-generate yalesites-platform --filepath=/tmp/secrets.json
appserver=$(docker ps --format "{{.Names}}" | grep yalesitesplatform_appserver | grep -v nginx)
docker cp /tmp/secrets.json "$appserver":/tmp
terminus secret:site:local-generate yalesites-platform --filepath=./secrets.json

# Install packages and install Drupal using yalesites_profile.
npm install
Expand Down

0 comments on commit cf4ccc1

Please sign in to comment.