Skip to content

Commit

Permalink
updating lagoon components
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Clifford committed Feb 14, 2023
1 parent 11128fd commit ad18c61
Show file tree
Hide file tree
Showing 19 changed files with 7,753 additions and 3,059 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Local project name - setting this here aligns container names with routes
COMPOSE_PROJECT_NAME=drupal-decoupled-app
25 changes: 19 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# Ignore files generated by PhpStorm
.idea
# Ignore directories generated by Composer
/.drush-lock-update
/drush/Commands/contrib/
/drush/sites/lagoon.site.yml
/vendor/
/web

# Ignore Drupal's file directory
/web/sites/*/files/

# Other
.DS_Store
# Ingore files that are only for the current local environment
web/sites/*/settings.local.php
web/sites/*/services.local.yml

# Environment specific configuration
.env
# Ignore SimpleTest multi-site environment.
web/sites/simpletest

# Ignore files generated by PhpStorm
/.idea/
/.editorconfig
/.gitattributes

# Cruft
.vscode
Expand Down
36 changes: 17 additions & 19 deletions .lagoon.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
docker-compose-yaml: docker-compose.yml

project: decoupled-drupal-example
endpoint: api-lagoon-master.lagoon.ch.amazee.io:31472
api: api-lagoon-master.lagoon.ch.amazee.io:80

tasks:
post-rollout:
- run:
name: env variables
command: env
service: cli
- run:
name: IF no Drupal installed drush si with no email sending
command: |
cd web
if [[ $(drush core-status bootstrap --pipe) == "" ]]; then
# no drupal installed, we install drupal from scratch
drush si config_installer -y --account-name=admin --account-pass=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
fi
service: cli
- run:
name: drush cim
command: cd web && drush -y cim
service: cli
# - run:
# name: env variables
# command: env
# service: cli
# - run:
# name: IF no Drupal installed drush si with no email sending
# command: |
# cd web
# if [[ $(drush core-status bootstrap --pipe) == "" ]]; then
# # no drupal installed, we install drupal from scratch
# drush si config_installer -y --account-name=admin --account-pass=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
# fi
# service: cli
# - run:
# name: drush cim
# command: cd web && drush -y cim
# service: cli
- run:
name: drush cr
command: cd web && drush -y cr
Expand Down
5 changes: 3 additions & 2 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/vendor
sites/default/files
.git
vendor
web/sites/default/files
3 changes: 3 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ css/map

# Ignore css files from custom themes
/web/themes/*/css/*.*
/.drush-lock-update
/.editorconfig
/.gitattributes
6 changes: 0 additions & 6 deletions backend/Dockerfile.cli

This file was deleted.

1 change: 0 additions & 1 deletion backend/Dockerfile.mariadb

This file was deleted.

28 changes: 28 additions & 0 deletions backend/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Place files in here that you want to add to your Drupal site. You will also need to add them to the extra/file-mapping section in composer.json.

As per https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold
e.g.
```
"file-mapping": {
"[web-root]/sites/default/all.settings.php": "assets/all.settings.php"
},
```



Settings files are loaded in this order:
* _Loaded by amazeeio/drupal-integrations_
- settings.php
- settings.lagoon.php
* _For settings and services that should be applied to all environments (dev, prod, staging, docker, etc)._
- all.settings.php
- all.services.yml
* _For settings and services that should be applied only for the production environment._
- production.settings.php
- production.services.yml
* _For settings and services that should be applied only for the development (Lagoon and local) environments._
- development.settings.php
- development.services.yml
* _For settings and services only for the local environment, these files will not be committed in Git!_
- settings.local.php
- services.local.yml
29 changes: 29 additions & 0 deletions backend/assets/all.settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* @file
* amazee.io Drupal all environment configuration file.
*
* This file should contain all settings.php configurations that are needed by all environments.
*
* It contains some defaults that the amazee.io team suggests, please edit them as required.
*/

// Defines where the sync folder of your configuration lives. In this case it's inside
// the Drupal root, which is protected by amazee.io Nginx configs, so it cannot be read
// via the browser. If your Drupal root is inside a subfolder (like 'web') you can put the config
// folder outside this subfolder for an advanced security measure: '../config/sync'.
$settings['config_sync_directory'] = '../config/sync';

if (getenv('LAGOON_ENVIRONMENT_TYPE') !== 'production') {
/**
* Skip file system permissions hardening.
*
* The system module will periodically check the permissions of your site's
* site directory to ensure that it is not writable by the website user. For
* sites that are managed with a version control system, this can cause problems
* when files in that directory such as settings.php are updated, because the
* user pulling in the changes won't have permissions to modify files in the
* directory.
*/
$settings['skip_permissions_hardening'] = TRUE;
}
88 changes: 47 additions & 41 deletions backend/composer.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,76 @@
{
"name": "fubhy/drupal-decoupled-app",
"name": "lagoon-examples/drupal-decoupled-app",
"description": "A demo project for showcasing decoupled Drupal with React.",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "The Lagoon Authors",
"homepage": "https://github.com/uselagoon",
"email": "[email protected]"
}
],
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6",
"drupal-composer/drupal-scaffold": "^2.2",
"drupal/config_installer": "1.x-dev",
"drupal/console": "~1.0",
"drupal/core": "~8.0",
"drupal/graphql": "3.x-dev",
"drush/drush": "~8.0",
"webflo/drupal-finder": "^0.2.1",
"webmozart/path-util": "^2.3"
"amazeeio/drupal_integrations": "0.3.7",
"composer/installers": "2.2.0",
"cweagans/composer-patches": "1.7.3",
"drupal/core-composer-scaffold": "10.0.3",
"drupal/core-project-message": "10.0.3",
"drupal/core-recommended": "10.0.3",
"drupal/graphql": "^4.4",
"drupal/lagoon_logs": "2.1.1",
"drupal/purge": "3.4.0",
"drupal/typed_data": "^2.0@dev",
"drush/drush": "^11.4",
"zaporylie/composer-drupal-optimizations": "1.2.0"
},
"require-dev": {
"behat/mink": "~1.7",
"behat/mink-goutte-driver": "~1.2",
"jcalderonzumba/gastonjs": "~1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
"mikey179/vfsstream": "~1.2",
"phpunit/phpunit": ">=4.8.28 <5",
"symfony/css-selector": "~2.8"
"drupal/core-dev-pinned": "10.0.3"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"autoload": {
"classmap": [
"scripts/composer/ScriptHandler.php"
]
},
"scripts": {
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"pre-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
]
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true,
"zaporylie/composer-drupal-optimizations": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/contrib/{$name}": ["type:drupal-drush"]
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"drupal-scaffold": {
"allowed-packages": [
"amazeeio/drupal_integrations"
],
"file-mapping": {
"[web-root]/sites/default/all.settings.php": "assets/all.settings.php"
},
"locations": {
"web-root": "web/"
}
}
}
}
Loading

0 comments on commit ad18c61

Please sign in to comment.