From 7e7dec95e81a5b1418f4aad623c324bd415ff48d Mon Sep 17 00:00:00 2001 From: gauravaxl <145740828+gauravaxl@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:52:29 +0530 Subject: [PATCH] lando-dependency: Removed lando dependencies from setup (#295) --- .gitlab/ci.sh | 12 ----- .gitlab/platform.yml | 67 ---------------------------- .gitlab/settings.local.php | 19 -------- .gitpod.yml | 12 ++--- .lando.yml | 39 ---------------- .lando/php.ini | 46 ------------------- web/sites/default/settings.lando.php | 65 --------------------------- web/sites/default/settings.php | 3 -- 8 files changed, 6 insertions(+), 257 deletions(-) delete mode 100755 .gitlab/ci.sh delete mode 100644 .gitlab/platform.yml delete mode 100644 .gitlab/settings.local.php delete mode 100644 .lando.yml delete mode 100644 .lando/php.ini delete mode 100644 web/sites/default/settings.lando.php diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh deleted file mode 100755 index 738e1e78..00000000 --- a/.gitlab/ci.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -dir=$(dirname $0) - -set -ex - -cp ${dir}/settings.local.php ${dir}/../web/sites/default/settings.local.php - -sed -ri -e "s!/var/www/html/web!$CI_PROJECT_DIR/web!g" /etc/apache2/sites-available/*.conf -sed -ri -e "s!/var/www/html/web!$CI_PROJECT_DIR/web!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf - -service apache2 start diff --git a/.gitlab/platform.yml b/.gitlab/platform.yml deleted file mode 100644 index 562857cc..00000000 --- a/.gitlab/platform.yml +++ /dev/null @@ -1,67 +0,0 @@ -.deploy: &deploy - image: axelerant/platformsh-cli:latest - before_script: - - eval $(ssh-agent -s) - - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - - mkdir -p ~/.ssh - script: - - platform project:set-remote ${PLATFORM_PROJECT_ID} - - platform push --verbose --activate --force --target ${CI_COMMIT_REF_NAME} - # Explicitly specify the environment as the CLI is not able to figure it out for some reason. - - PLATFORM_URL=$(platform url --primary --pipe --environment ${CI_COMMIT_REF_NAME}) - - echo "PLATFORM_URL=$PLATFORM_URL" > dotenv - artifacts: - reports: - dotenv: dotenv - except: - - schedule - -review: - stage: deploy - <<: *deploy - tags: - - docker - only: - - merge_requests - except: - - master - - schedule - - /^(renovate/)?(skip|no)-review/.*$/ - environment: - name: review/$CI_BUILD_REF_NAME - url: $PLATFORM_URL - on_stop: stop_review - auto_stop_in: 3 days - -platformsh: - stage: deploy - <<: *deploy - tags: - - docker - only: - - master - except: - - schedule - environment: - name: production - url: https://ks.axelerant.com - -stop_review: - stage: deploy - <<: *deploy - script: - - platform environment:delete -y -p $PLATFORM_PROJECT_ID $CI_COMMIT_REF_NAME - variables: - GIT_STRATEGY: none - when: manual - only: - - merge_requests - except: - - master - - schedule - - /^(renovate/)?(skip|no)-review/.*$/ - environment: - name: review/$CI_BUILD_REF_NAME - action: stop - tags: - - docker diff --git a/.gitlab/settings.local.php b/.gitlab/settings.local.php deleted file mode 100644 index 9c05ee16..00000000 --- a/.gitlab/settings.local.php +++ /dev/null @@ -1,19 +0,0 @@ - 'mysql', - 'database' => 'drupal8', - 'username' => 'drupal8', - 'password' => 'drupal8', - 'host' => 'mariadb' -]; - -/** - * Fix for Hash salt error on drush cr - * - * @ref https://github.com/drush-ops/drush/issues/1050 - * - */ -$settings['hash_salt'] = 'CHANGE_THIS'; - -$settings['trusted_host_patterns'][] = '^localhost$'; diff --git a/.gitpod.yml b/.gitpod.yml index dcd5c468..a01a7147 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,11 +4,11 @@ image: tasks: - name: Drupal start init: | - lando start - lando composer install - lando drush cim -y - lando drush updb -y - lando drush cr + ddev start + ddev composer install + ddev drush cim -y + ddev drush updb -y + ddev drush cr cd web/themes/custom/contribtracker npm i npx gulp @@ -25,4 +25,4 @@ vscode: - tombonnike.vscode-status-bar-format-toggle - usernamehw.errorlens - whatwedo.twig - - marcostazi.vs-code-drupal + - marcostazi.vs-code-drupal \ No newline at end of file diff --git a/.lando.yml b/.lando.yml deleted file mode 100644 index 2b24d326..00000000 --- a/.lando.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: contribtracker -recipe: drupal9 - -services: - appserver: - type: php:8.1 - via: nginx - cache: - type: redis:6 - database: - type: mariadb:10.6 - overrides: - image: ghcr.io/contrib-tracker/backend-db:main - -tooling: - drush: - service: appserver - cmd: /app/vendor/bin/drush - drupal: - service: appserver - cmd: /app/vendor/bin/drupal - redis-cli: - service: cache - phpunit: - service: appserver - cmd: /app/vendor/bin/phpunit - -config: - php: 8.1 - via: nginx - webroot: web - conf: - php: .lando/php.ini - -events: - post-start: - - echo "Running post start scripts. Please be patient." - - cache: redis-cli flushall - - appserver: composer install && drush cr diff --git a/.lando/php.ini b/.lando/php.ini deleted file mode 100644 index 4db9977c..00000000 --- a/.lando/php.ini +++ /dev/null @@ -1,46 +0,0 @@ -[PHP] - -;;;;;;;;;;;;;;; -; PHP Globals ; -;;;;;;;;;;;;;;; - -short_open_tag = Off -output_buffering = 4096 -allow_call_time_pass_reference = Off -variables_order = "GPCS" -request_order = "GP" -register_long_arrays = Off -register_argc_argv = Off -magic_quotes_gpc = Off -enable_dl = Off -allow_url_fopen = On -realpath_cache_size = "800K" -realpath_cache_ttl = "86400" -disable_functions = -;include_path = ".:/usr/share/pear:/usr/share/php" - -[Date] -date.timezone = "UTC" - -;;;;;;;;;;;;;;;;;;;;;; -;; PACKAGE SETTINGS ;; -;;;;;;;;;;;;;;;;;;;;;; - -; Xdebug -xdebug.max_nesting_level = 256 -xdebug.show_exception_trace = 0 -xdebug.collect_params = 0 - -; Globals -expose_php = on -max_execution_time = 90 -max_input_time = 900 -max_input_vars = 10000 -memory_limit = 512M -upload_max_filesize = 100M -post_max_size = 100M -error_reporting = E_ALL & ~E_DEPRECATED -ignore_repeated_errors = on -html_errors = off -display_errors = on -log_errors = on diff --git a/web/sites/default/settings.lando.php b/web/sites/default/settings.lando.php deleted file mode 100644 index bade99b1..00000000 --- a/web/sites/default/settings.lando.php +++ /dev/null @@ -1,65 +0,0 @@ - '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'], - ]; - - // Set Redis as the default backend for any cache bin not otherwise specified. - $settings['cache']['default'] = 'cache.backend.redis'; - $settings['redis.connection']['host'] = $lando_info['cache']['internal_connection']['host']; - $settings['redis.connection']['port'] = $lando_info['cache']['internal_connection']['port']; - - // Apply changes to the container configuration to better leverage Redis. - // This includes using Redis for the lock and flood control systems, as well - // as the cache tag checksum. Alternatively, copy the contents of that file - // to your project-specific services.yml file, modify as appropriate, and - // remove this line. - $settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml'; - - // Allow the services to work before the Redis module itself is enabled. - $settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml'; - - // Manually add the classloader path, this is required for the container cache bin definition below - // and allows to use it without the redis module being enabled. - $class_loader->addPsr4('Drupal\\redis\\', 'modules/contrib/redis/src'); - - // Use redis for container cache. - // The container cache is used to load the container definition itself, and - // thus any configuration stored in the container itself is not available - // yet. These lines force the container cache to use Redis rather than the - // default SQL cache. - $settings['bootstrap_container_definition'] = [ - 'parameters' => [], - 'services' => [ - 'redis.factory' => [ - 'class' => 'Drupal\redis\ClientFactory', - ], - 'cache.backend.redis' => [ - 'class' => 'Drupal\redis\Cache\CacheBackendFactory', - 'arguments' => ['@redis.factory', '@cache_tags_provider.container', '@serialization.phpserialize'], - ], - 'cache.container' => [ - 'class' => '\Drupal\redis\Cache\PhpRedis', - 'factory' => ['@cache.backend.redis', 'get'], - 'arguments' => ['container'], - ], - 'cache_tags_provider.container' => [ - 'class' => 'Drupal\redis\Cache\RedisCacheTagsChecksum', - 'arguments' => ['@redis.factory'], - ], - 'serialization.phpserialize' => [ - 'class' => 'Drupal\Component\Serialization\PhpSerialize', - ], - ], - ]; - - $settings['hash_salt'] = md5(getenv('LANDO_HOST_IP')); -} diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 539a0f8c..4c2b227a 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -870,8 +870,6 @@ include $app_root . '/' . $site_path . '/settings.local.php'; } -include $app_root . '/' . $site_path . '/settings.lando.php'; - // Automatically generated include for settings managed by ddev. $ddev_settings = dirname(__FILE__) . '/settings.ddev.php'; if (is_readable($ddev_settings) && getenv('IS_DDEV_PROJECT') == 'true') { @@ -880,4 +878,3 @@ } $settings['config_sync_directory'] = '../config/sync'; -$config['config_split.config_split.dev']['status'] = getenv('LANDO') === 'ON';