From 5bee26cff56092ed22928ecf8bb590a692f95010 Mon Sep 17 00:00:00 2001 From: nfawbert <62660788+nfawbert@users.noreply.github.com> Date: Fri, 28 Jan 2022 15:49:52 +0000 Subject: [PATCH 01/39] Fix docker-compose v2 issue and re-release to include clamav role (#68) --- RELEASE | 4 ++-- package.json | 2 +- src/controller-manager.ts | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index b1aff8c..0534519 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.17 -Release to repackage ce-dev to force d8 compatible drush version. +1.1.18 +Release to repackage ce-dev to fix docker-compose v2 volumes issue and install clamav role. diff --git a/package.json b/package.json index 0546524..8b5cbc4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.17", + "version": "1.1.18", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" diff --git a/src/controller-manager.ts b/src/controller-manager.ts index 974bd4a..9d51cc5 100644 --- a/src/controller-manager.ts +++ b/src/controller-manager.ts @@ -245,6 +245,9 @@ export default class ControllerManager { volumes: [ 'ce_dev_ssh:/home/ce-dev/.ssh', 'ce_dev_mkcert:/home/ce-dev/.local/share/mkcert', + 'ce_dev_apt_cache:/var/cache/apt/archives', + 'ce_dev_composer_cache:/home/ce-dev/.composer/cache', + 'ce_dev_nvm_node:/home/ce-dev/.nvm/versions/node', '/sys/fs/cgroup:/sys/fs/cgroup:ro', this.config.cacheDir + ':/home/ce-dev/.ce-dev-cache', ], From e42ebd1b8c42d38053661d21ca6631f5ece79ddd Mon Sep 17 00:00:00 2001 From: nfawbert <62660788+nfawbert@users.noreply.github.com> Date: Wed, 2 Feb 2022 11:36:00 +0000 Subject: [PATCH 02/39] Killing old ce-dev container when updating (#70) --- install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0f1a5ba..8f04ac2 100644 --- a/install.sh +++ b/install.sh @@ -46,5 +46,15 @@ if [ -f /usr/local/bin/ce-dev ]; then fi sudo ln -s /opt/ce-dev/bin/ce-dev /usr/local/bin/ce-dev echo "done." + +echo "Killing deprecated running ce_dev_controller container..." +if [ "$(docker ps -q -f name=ce_dev_controller)" ]; then + if [ "$(docker ps -aq -f status=running -f name=ce_dev_controller)" ]; then + # cleanup + docker kill ce_dev_controller + fi +fi +echo "done." + echo -echo "All done." \ No newline at end of file +echo "All done." From b0dc9d925e34a44a88fa6610322b149606d8a4b0 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Wed, 9 Mar 2022 16:46:31 +0100 Subject: [PATCH 03/39] Added Drupal9 and Localgov templates (#73) --- src/commands/create.ts | 2 + templates/drupal9/.gitignore | 2 + templates/drupal9/ce-dev/.gitignore | 2 + .../drupal9/ce-dev/ansible/deploy.yml.j2 | 57 +++++++++++++++++ .../drupal9/ce-dev/ansible/provision.yml.j2 | 64 +++++++++++++++++++ .../web/sites/default/ce-dev.drush.yml.j2 | 4 ++ .../web/sites/default/ce-dev.settings.php.j2 | 29 +++++++++ .../ce-dev/ce-dev.compose.prebuilt.yml.j2 | 39 +++++++++++ .../drupal9/ce-dev/ce-dev.compose.yml.j2 | 39 +++++++++++ templates/localgov/.gitignore | 2 + templates/localgov/ce-dev/.gitignore | 2 + .../localgov/ce-dev/ansible/deploy.yml.j2 | 61 ++++++++++++++++++ .../localgov/ce-dev/ansible/provision.yml.j2 | 64 +++++++++++++++++++ .../web/sites/default/ce-dev.drush.yml.j2 | 4 ++ .../web/sites/default/ce-dev.settings.php.j2 | 29 +++++++++ .../ce-dev/ce-dev.compose.prebuilt.yml.j2 | 39 +++++++++++ .../localgov/ce-dev/ce-dev.compose.yml.j2 | 39 +++++++++++ 17 files changed, 478 insertions(+) create mode 100644 templates/drupal9/.gitignore create mode 100644 templates/drupal9/ce-dev/.gitignore create mode 100644 templates/drupal9/ce-dev/ansible/deploy.yml.j2 create mode 100644 templates/drupal9/ce-dev/ansible/provision.yml.j2 create mode 100644 templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 create mode 100644 templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 create mode 100644 templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 create mode 100644 templates/drupal9/ce-dev/ce-dev.compose.yml.j2 create mode 100644 templates/localgov/.gitignore create mode 100644 templates/localgov/ce-dev/.gitignore create mode 100644 templates/localgov/ce-dev/ansible/deploy.yml.j2 create mode 100644 templates/localgov/ce-dev/ansible/provision.yml.j2 create mode 100644 templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 create mode 100644 templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 create mode 100644 templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 create mode 100644 templates/localgov/ce-dev/ce-dev.compose.yml.j2 diff --git a/src/commands/create.ts b/src/commands/create.ts index 450b207..ba09a04 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -79,6 +79,8 @@ export default class CreateCmd extends BaseCmd { type: 'list', choices: [ 'drupal8', + 'drupal9', + 'localgov', 'blank', ], }]) diff --git a/templates/drupal9/.gitignore b/templates/drupal9/.gitignore new file mode 100644 index 0000000..5ec454f --- /dev/null +++ b/templates/drupal9/.gitignore @@ -0,0 +1,2 @@ +vendor +node_modules \ No newline at end of file diff --git a/templates/drupal9/ce-dev/.gitignore b/templates/drupal9/ce-dev/.gitignore new file mode 100644 index 0000000..1c1a5e7 --- /dev/null +++ b/templates/drupal9/ce-dev/.gitignore @@ -0,0 +1,2 @@ +*.retry +docker-compose.yml \ No newline at end of file diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 new file mode 100644 index 0000000..29aaef8 --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -0,0 +1,57 @@ +--- +# Template playbook for a local Drupal9 codebase. +- hosts: {{ project_name }}-web + vars: + - project_name: {{ project_name }} + - project_type: drupal8 + - webroot: web + - build_type: local + - _env_type: dev +{% raw %} + - _domain_name: www.{{ project_name }}.local + # Path to your project root. This must match the "volume" set in the docker-compose template. + - deploy_path: /home/ce-dev/deploy/live.local + # This actually does not take any backup, but is needed to populate settings.php. + - mysql_backup: + handling: none + credentials_handling: static + # A list of Drupal sites (for multisites). + - drupal: + sites: + - folder: "default" + public_files: "sites/default/files" + install_command: "-y si" + # Toggle config import on/off. Disabled for initial passes. + config_import_command: "" + # config_import_command: "cim" + config_sync_directory: "config/sync" + sanitize_command: "sql-sanitize" + # Remove after initial pass, to avoid reinstalling Drupal. + force_install: true + base_url: "https://{{ _domain_name }}" + # Composer command to run. + - composer: + command: install + no_dev: false + working_dir: "{{ deploy_path }}" + apcu_autoloader: false + pre_tasks: + # You can safely remove these steps once you have a working composer.json. + - name: Download composer file. + get_url: + url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + dest: "{{ deploy_path }}/composer.json" + force: false + - name: Install drush. + command: + cmd: composer require drush/drush:11.* + chdir: "{{ deploy_path }}" + roles: + - _init # Sets some variables the deploy scripts rely on. + - composer # Composer install step. + - database_backup # This is still needed to generate credentials. + - config_generate # Generates settings.php +# - sync/database_sync # Grab database from a remote server. + - database_apply # Run drush updb and config import. + - _exit # Some common housekeeping. +{% endraw %} diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 new file mode 100644 index 0000000..2f75b3f --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -0,0 +1,64 @@ +- hosts: {{ project_name }}-web + become: true + vars: + - _domain_name: www.{{ project_name }}.local + - _env_type: dev + - project_name: {{ project_name }} + - mysql_client: + host: {{ project_name }}-db + user: root + password: ce-dev + {% raw %} + - nginx: + domains: + - server_name: "{{ _domain_name }}" + access_log: "/var/log/nginx-access.log" + error_log: "/var/log/nginx-error.log" + error_log_level: "notice" + webroot: "/home/ce-dev/deploy/live.local/web" + project_type: "drupal8" + ssl: + domain: "{{ _domain_name }}" + cert: "{{ _ce_dev_mkcert_base}}/{{ _domain_name }}.pem" + key: "{{ _ce_dev_mkcert_base}}/{{ _domain_name }}-key.pem" + handling: "unmanaged" + ratelimitingcrawlers: false + is_default: true + servers: + - port: 80 + ssl: false + https_redirect: true + - port: 443 + ssl: true + https_redirect: false + upstreams: [] + - php: + version: + - 7.4 + cli: + memory_limit: -1 + _env_type: dev + fpm: + _env_type: dev + - xdebug: + cli: true + - lhci: + enable_vnc: true +{% endraw %} + tasks: + - apt: + update_cache: true + - import_role: + name: _meta/common_base + - import_role: + name: mysql_client + - import_role: + name: php-cli + - import_role: + name: php-fpm + - import_role: + name: nginx + - import_role: + name: lhci + - import_role: + name: frontail diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 new file mode 100644 index 0000000..b88bf28 --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 @@ -0,0 +1,4 @@ +# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml + +options: + uri: '{{ site.base_url }}' \ No newline at end of file diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 new file mode 100644 index 0000000..d5eb492 --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 @@ -0,0 +1,29 @@ + '{{ build_databases[0].name }}', + 'username' => '{{ build_databases[0].user }}', + 'password' => '{{ build_databases[0].password }}', + 'prefix' => '', + 'host' => '{{ build_databases[0].host }}', + 'port' => '3306', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', + 'driver' => 'mysql', +); + +$settings['file_private_path'] = '{{ build_private_file_path }}'; +$settings['file_public_path'] = '{{ build_public_file_path }}'; + +// Drupal < 8.8 +$config_directories['sync'] = '{{ build_config_sync_directory }}'; +// Drupal 8.8 +$settings['config_sync_directory'] = '{{ build_config_sync_directory }}'; diff --git a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 new file mode 100644 index 0000000..9902799 --- /dev/null +++ b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -0,0 +1,39 @@ +version: '3.7' +x-ce_dev: + version: 1.x + registry: 'localhost:5000' + project_name: {{ project_name }} + provision: + - ce-dev/ansible/provision.yml + deploy: + - ce-dev/ansible/deploy.yml + urls: + - 'https://www.{{ project_name }}.local' +services: + web: + image: 'codeenigma/drupal8-web:latest' + expose: + - 443 + - 80 + x-ce_dev: + host_aliases: + - www.{{ project_name }}.local + # Uncomment and comment the "volumes" below to use Unison file sync. + # unison: + # - src: ../ + # dest: /home/ce-dev/deploy/live.local + # target_platforms: + # - darwin + # - linux + # ignore: + # - Name vendor + # - Name node_modules + # - Path */sites/*/files + volumes: + - ../:/home/ce-dev/deploy/live.local:delegated + cap_add: + - NET_ADMIN + db: + image: 'codeenigma/drupal8-db:latest' + environment: + MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 new file mode 100644 index 0000000..61cd6f7 --- /dev/null +++ b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 @@ -0,0 +1,39 @@ +version: "3.7" +x-ce_dev: + version: 1.x + registry: localhost:5000 + project_name: {{ project_name }} + provision: + - ce-dev/ansible/provision.yml + deploy: + - ce-dev/ansible/deploy.yml + urls: + - https://www.{{ project_name }}.local +services: + web: + image: codeenigma/ce-dev-1.x:latest + expose: + - 443 + - 80 + x-ce_dev: + host_aliases: + - www.{{ project_name }}.local + # Uncomment and comment the "volumes" below to use Unison file sync. + # unison: + # - src: ../ + # dest: /home/ce-dev/deploy/live.local + # target_platforms: + # - darwin + # - linux + # ignore: + # - Name vendor + # - Name node_modules + # - Path */sites/*/files + volumes: + - ../:/home/ce-dev/deploy/live.local:delegated + cap_add: + - NET_ADMIN + db: + image: mariadb + environment: + MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/localgov/.gitignore b/templates/localgov/.gitignore new file mode 100644 index 0000000..5ec454f --- /dev/null +++ b/templates/localgov/.gitignore @@ -0,0 +1,2 @@ +vendor +node_modules \ No newline at end of file diff --git a/templates/localgov/ce-dev/.gitignore b/templates/localgov/ce-dev/.gitignore new file mode 100644 index 0000000..1c1a5e7 --- /dev/null +++ b/templates/localgov/ce-dev/.gitignore @@ -0,0 +1,2 @@ +*.retry +docker-compose.yml \ No newline at end of file diff --git a/templates/localgov/ce-dev/ansible/deploy.yml.j2 b/templates/localgov/ce-dev/ansible/deploy.yml.j2 new file mode 100644 index 0000000..96dea95 --- /dev/null +++ b/templates/localgov/ce-dev/ansible/deploy.yml.j2 @@ -0,0 +1,61 @@ +--- +# Template playbook for a local Drupal9 codebase. +- hosts: {{ project_name }}-web + vars: + - project_name: {{ project_name }} + - project_type: drupal8 + - webroot: web + - build_type: local + - _env_type: dev +{% raw %} + - _domain_name: www.{{ project_name }}.local + # Path to your project root. This must match the "volume" set in the docker-compose template. + - deploy_path: /home/ce-dev/deploy/live.local + # This actually does not take any backup, but is needed to populate settings.php. + - mysql_backup: + handling: none + credentials_handling: static + # A list of Drupal sites (for multisites). + - drupal: + sites: + - folder: "default" + public_files: "sites/default/files" + install_command: "-y si localgov" + # Toggle config import on/off. Disabled for initial passes. + config_import_command: "" + # config_import_command: "cim" + config_sync_directory: "config/sync" + sanitize_command: "sql-sanitize" + # Remove after initial pass, to avoid reinstalling Drupal. + force_install: true + base_url: "https://{{ _domain_name }}" + # Composer command to run. + - composer: + command: install + no_dev: false + working_dir: "{{ deploy_path }}" + apcu_autoloader: false + pre_tasks: + # You can safely remove these steps once you have a working composer.json. + - name: Download composer file. + get_url: + url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + dest: "{{ deploy_path }}/composer.json" + force: false + - name: Install drush. + command: + cmd: composer require drush/drush:11.* + chdir: "{{ deploy_path }}" + - name: Install localgov. + command: + cmd: composer require localgovdrupal/localgov + chdir: "{{ deploy_path }}" + roles: + - _init # Sets some variables the deploy scripts rely on. + - composer # Composer install step. + - database_backup # This is still needed to generate credentials. + - config_generate # Generates settings.php +# - sync/database_sync # Grab database from a remote server. + - database_apply # Run drush updb and config import. + - _exit # Some common housekeeping. +{% endraw %} diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 new file mode 100644 index 0000000..2f75b3f --- /dev/null +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -0,0 +1,64 @@ +- hosts: {{ project_name }}-web + become: true + vars: + - _domain_name: www.{{ project_name }}.local + - _env_type: dev + - project_name: {{ project_name }} + - mysql_client: + host: {{ project_name }}-db + user: root + password: ce-dev + {% raw %} + - nginx: + domains: + - server_name: "{{ _domain_name }}" + access_log: "/var/log/nginx-access.log" + error_log: "/var/log/nginx-error.log" + error_log_level: "notice" + webroot: "/home/ce-dev/deploy/live.local/web" + project_type: "drupal8" + ssl: + domain: "{{ _domain_name }}" + cert: "{{ _ce_dev_mkcert_base}}/{{ _domain_name }}.pem" + key: "{{ _ce_dev_mkcert_base}}/{{ _domain_name }}-key.pem" + handling: "unmanaged" + ratelimitingcrawlers: false + is_default: true + servers: + - port: 80 + ssl: false + https_redirect: true + - port: 443 + ssl: true + https_redirect: false + upstreams: [] + - php: + version: + - 7.4 + cli: + memory_limit: -1 + _env_type: dev + fpm: + _env_type: dev + - xdebug: + cli: true + - lhci: + enable_vnc: true +{% endraw %} + tasks: + - apt: + update_cache: true + - import_role: + name: _meta/common_base + - import_role: + name: mysql_client + - import_role: + name: php-cli + - import_role: + name: php-fpm + - import_role: + name: nginx + - import_role: + name: lhci + - import_role: + name: frontail diff --git a/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 b/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 new file mode 100644 index 0000000..b88bf28 --- /dev/null +++ b/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 @@ -0,0 +1,4 @@ +# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml + +options: + uri: '{{ site.base_url }}' \ No newline at end of file diff --git a/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 b/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 new file mode 100644 index 0000000..d5eb492 --- /dev/null +++ b/templates/localgov/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 @@ -0,0 +1,29 @@ + '{{ build_databases[0].name }}', + 'username' => '{{ build_databases[0].user }}', + 'password' => '{{ build_databases[0].password }}', + 'prefix' => '', + 'host' => '{{ build_databases[0].host }}', + 'port' => '3306', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', + 'driver' => 'mysql', +); + +$settings['file_private_path'] = '{{ build_private_file_path }}'; +$settings['file_public_path'] = '{{ build_public_file_path }}'; + +// Drupal < 8.8 +$config_directories['sync'] = '{{ build_config_sync_directory }}'; +// Drupal 8.8 +$settings['config_sync_directory'] = '{{ build_config_sync_directory }}'; diff --git a/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 new file mode 100644 index 0000000..9902799 --- /dev/null +++ b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -0,0 +1,39 @@ +version: '3.7' +x-ce_dev: + version: 1.x + registry: 'localhost:5000' + project_name: {{ project_name }} + provision: + - ce-dev/ansible/provision.yml + deploy: + - ce-dev/ansible/deploy.yml + urls: + - 'https://www.{{ project_name }}.local' +services: + web: + image: 'codeenigma/drupal8-web:latest' + expose: + - 443 + - 80 + x-ce_dev: + host_aliases: + - www.{{ project_name }}.local + # Uncomment and comment the "volumes" below to use Unison file sync. + # unison: + # - src: ../ + # dest: /home/ce-dev/deploy/live.local + # target_platforms: + # - darwin + # - linux + # ignore: + # - Name vendor + # - Name node_modules + # - Path */sites/*/files + volumes: + - ../:/home/ce-dev/deploy/live.local:delegated + cap_add: + - NET_ADMIN + db: + image: 'codeenigma/drupal8-db:latest' + environment: + MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/localgov/ce-dev/ce-dev.compose.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 new file mode 100644 index 0000000..61cd6f7 --- /dev/null +++ b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 @@ -0,0 +1,39 @@ +version: "3.7" +x-ce_dev: + version: 1.x + registry: localhost:5000 + project_name: {{ project_name }} + provision: + - ce-dev/ansible/provision.yml + deploy: + - ce-dev/ansible/deploy.yml + urls: + - https://www.{{ project_name }}.local +services: + web: + image: codeenigma/ce-dev-1.x:latest + expose: + - 443 + - 80 + x-ce_dev: + host_aliases: + - www.{{ project_name }}.local + # Uncomment and comment the "volumes" below to use Unison file sync. + # unison: + # - src: ../ + # dest: /home/ce-dev/deploy/live.local + # target_platforms: + # - darwin + # - linux + # ignore: + # - Name vendor + # - Name node_modules + # - Path */sites/*/files + volumes: + - ../:/home/ce-dev/deploy/live.local:delegated + cap_add: + - NET_ADMIN + db: + image: mariadb + environment: + MYSQL_ROOT_PASSWORD: ce-dev From 34ce84ccd26d51fbd9f33221fdc6cc3ba3e41126 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Thu, 10 Mar 2022 11:52:53 +0100 Subject: [PATCH 04/39] New release 1.1.19 (#75) --- RELEASE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE b/RELEASE index 0534519..0fc372a 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.18 -Release to repackage ce-dev to fix docker-compose v2 volumes issue and install clamav role. +1.1.19 +Release to add the templates: Drupal 9 and Localgov From cae50ba48d66e4a97cd54f940d407add1b20fe13 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Thu, 10 Mar 2022 12:02:07 +0100 Subject: [PATCH 05/39] Updated package.json version: 1.1.19 (#77) * Updated package.json version: 1.1.19 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b5cbc4..24a84ae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.18", + "version": "1.1.19", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 79372e7e2a030bf61c726d2a36c3aad0c67ef8e1 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Fri, 1 Jul 2022 16:56:08 +0200 Subject: [PATCH 06/39] New tag to fix repo key for Chrome (#83) --- RELEASE | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 0fc372a..00e1e1e 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.19 -Release to add the templates: Drupal 9 and Localgov +1.1.20 +No changes. A new tag to re-build the container image and fix the repo key for Chrome diff --git a/package.json b/package.json index 24a84ae..380d93a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.19", + "version": "1.1.20", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 4fa738cf21f2df858ab805a90e426d489caeedcb Mon Sep 17 00:00:00 2001 From: davids4 <35807961+davids4@users.noreply.github.com> Date: Thu, 8 Sep 2022 13:14:29 +0200 Subject: [PATCH 07/39] =?UTF-8?q?#CE-62820:=20Added=20support=20for=20comp?= =?UTF-8?q?oser=20'2.x'=20in=20Drupal=209=20provision=20tem=E2=80=A6=20(#8?= =?UTF-8?q?9)=20(#91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #CE-62820: Added support for composer '2.x' in Drupal 9 provision template. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'new_user' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default value for the 'key_name' in provision. * #CE-62820: Attempt to fix pull request test cases by providing a default values for 'ce_deploy' in provision. Co-authored-by: David Suissa Co-authored-by: David Suissa --- docker-images/controller/provision.yml | 4 ++++ templates/drupal9/ce-dev/ansible/provision.yml.j2 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docker-images/controller/provision.yml b/docker-images/controller/provision.yml index fbfde37..e26cd51 100644 --- a/docker-images/controller/provision.yml +++ b/docker-images/controller/provision.yml @@ -13,6 +13,8 @@ own_repository_branch: 1.x config_repository_branch: 1.x username: ce-dev + new_user: true + key_name: id_rsa.pub local_dir: /home/ce-dev/ce-deploy groups: [] - ce_provision: @@ -23,6 +25,8 @@ config_repository_branch: 1.x config_repository_skip_checkout: false username: ce-dev + new_user: true + key_name: id_rsa.pub local_dir: /home/ce-dev/ce-provision groups: [] galaxy_custom_requirements_file: "" diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 2f75b3f..ec0363e 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -40,6 +40,10 @@ _env_type: dev fpm: _env_type: dev + - php_composer: + version: '' + version_branch: '--2' + keep_updated: true - xdebug: cli: true - lhci: From 70954a3d16e63606e41cc763d9e5ed8d01fcaafe Mon Sep 17 00:00:00 2001 From: Dionisio Date: Thu, 8 Sep 2022 13:19:17 +0200 Subject: [PATCH 08/39] REL 1.1.21: Using composer 2 with Drupal 9 by default (#92) --- RELEASE | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index 00e1e1e..bd67827 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.20 -No changes. A new tag to re-build the container image and fix the repo key for Chrome +1.1.21 +Drupal 9 template configured with composer 2 by default diff --git a/package.json b/package.json index 380d93a..8c10d24 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.20", + "version": "1.1.21", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 906bc14e2b98af1b7417910a72b46fe06db0130e Mon Sep 17 00:00:00 2001 From: gregharvey Date: Fri, 9 Sep 2022 10:42:52 +0200 Subject: [PATCH 09/39] Adding a Drupal 9 template to ce-dev. --- templates/drupal9/ce-dev/ansible/deploy.yml.j2 | 4 ++-- templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 4 ++-- templates/prebuild.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 29aaef8..853fc4c 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -1,9 +1,9 @@ --- -# Template playbook for a local Drupal9 codebase. +# Template playbook for a local Drupal 9 codebase. - hosts: {{ project_name }}-web vars: - project_name: {{ project_name }} - - project_type: drupal8 + - project_type: drupal9 - webroot: web - build_type: local - _env_type: dev diff --git a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..c1f83bb 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -11,7 +11,7 @@ x-ce_dev: - 'https://www.{{ project_name }}.local' services: web: - image: 'codeenigma/drupal8-web:latest' + image: 'codeenigma/drupal9-web:latest' expose: - 443 - 80 @@ -34,6 +34,6 @@ services: cap_add: - NET_ADMIN db: - image: 'codeenigma/drupal8-db:latest' + image: 'codeenigma/drupal9-db:latest' environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/prebuild.sh b/templates/prebuild.sh index cb40a31..a812e09 100644 --- a/templates/prebuild.sh +++ b/templates/prebuild.sh @@ -1,7 +1,7 @@ #!/bin/sh # Test project creation and pre-build image. set -e -PROJECTS="blank drupal8" +PROJECTS="blank drupal8 drupal9" # Common processing. OWN_DIR=$(dirname "$0") From f29db1105937aa7dd70e26dd9dcb9b2513bb2f8f Mon Sep 17 00:00:00 2001 From: gregharvey Date: Fri, 9 Sep 2022 11:44:26 +0200 Subject: [PATCH 10/39] Testing nodejs version change with blank template. --- templates/blank/ce-dev/ansible/provision.yml.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/blank/ce-dev/ansible/provision.yml.j2 b/templates/blank/ce-dev/ansible/provision.yml.j2 index 796799a..1f1194c 100644 --- a/templates/blank/ce-dev/ansible/provision.yml.j2 +++ b/templates/blank/ce-dev/ansible/provision.yml.j2 @@ -8,6 +8,8 @@ - _env_type: dev - lhci: enable_vnc: true + - nodejs: + version: 14.x tasks: - apt: update_cache: true From 7fda697f343d0c363dcac538d0563b9488e836c7 Mon Sep 17 00:00:00 2001 From: gregharvey Date: Fri, 9 Sep 2022 11:49:11 +0200 Subject: [PATCH 11/39] Incrementing version for release. --- RELEASE | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index bd67827..ec9f751 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.21 -Drupal 9 template configured with composer 2 by default +1.1.22 +Drupal 9 template building. diff --git a/package.json b/package.json index 8c10d24..02d87ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.21", + "version": "1.1.22", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 2d2ece6e8d038426cc0816c5efb03bb39dfdba10 Mon Sep 17 00:00:00 2001 From: gregharvey Date: Fri, 9 Sep 2022 12:57:42 +0200 Subject: [PATCH 12/39] There's no drupal9 template for ce-deploy. --- templates/drupal9/ce-dev/ansible/deploy.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 853fc4c..0826731 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -3,7 +3,7 @@ - hosts: {{ project_name }}-web vars: - project_name: {{ project_name }} - - project_type: drupal9 + - project_type: drupal8 - webroot: web - build_type: local - _env_type: dev From 62e753ef439324cd4bfea536a93a163cba15c07d Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 9 Sep 2022 15:04:25 +0200 Subject: [PATCH 13/39] Drupal template fixes pr 1.x (#94) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. --- RELEASE | 4 ++-- package.json | 2 +- templates/blank/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/drupal9/ce-dev/ansible/deploy.yml.j2 | 2 +- templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 4 ++-- templates/prebuild.sh | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/RELEASE b/RELEASE index bd67827..ec9f751 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.1.21 -Drupal 9 template configured with composer 2 by default +1.1.22 +Drupal 9 template building. diff --git a/package.json b/package.json index 8c10d24..02d87ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.21", + "version": "1.1.22", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" diff --git a/templates/blank/ce-dev/ansible/provision.yml.j2 b/templates/blank/ce-dev/ansible/provision.yml.j2 index 796799a..1f1194c 100644 --- a/templates/blank/ce-dev/ansible/provision.yml.j2 +++ b/templates/blank/ce-dev/ansible/provision.yml.j2 @@ -8,6 +8,8 @@ - _env_type: dev - lhci: enable_vnc: true + - nodejs: + version: 14.x tasks: - apt: update_cache: true diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 29aaef8..0826731 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -1,5 +1,5 @@ --- -# Template playbook for a local Drupal9 codebase. +# Template playbook for a local Drupal 9 codebase. - hosts: {{ project_name }}-web vars: - project_name: {{ project_name }} diff --git a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..c1f83bb 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -11,7 +11,7 @@ x-ce_dev: - 'https://www.{{ project_name }}.local' services: web: - image: 'codeenigma/drupal8-web:latest' + image: 'codeenigma/drupal9-web:latest' expose: - 443 - 80 @@ -34,6 +34,6 @@ services: cap_add: - NET_ADMIN db: - image: 'codeenigma/drupal8-db:latest' + image: 'codeenigma/drupal9-db:latest' environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/prebuild.sh b/templates/prebuild.sh index cb40a31..a812e09 100644 --- a/templates/prebuild.sh +++ b/templates/prebuild.sh @@ -1,7 +1,7 @@ #!/bin/sh # Test project creation and pre-build image. set -e -PROJECTS="blank drupal8" +PROJECTS="blank drupal8 drupal9" # Common processing. OWN_DIR=$(dirname "$0") From 710a4e34ec03885dcc5575b51d0fd5ccc8a7a4c2 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Wed, 14 Sep 2022 15:32:50 +0200 Subject: [PATCH 14/39] CE-DEV: some updates and tweaks (#96) * Renamed the settings and drush files for ce-dev * Added nodejs 16.x as default version * Added lhci_run role by default * Some tweaks in the config * Added the if statement to read info from an optional settings.local.php file --- .../drupal9/ce-dev/ansible/deploy.yml.j2 | 19 ++++++++++++++----- .../drupal9/ce-dev/ansible/provision.yml.j2 | 2 ++ ...ce-dev.drush.yml.j2 => local.drush.yml.j2} | 0 ....settings.php.j2 => local.settings.php.j2} | 16 ++++++++++------ 4 files changed, 26 insertions(+), 11 deletions(-) rename templates/drupal9/ce-dev/ansible/web/sites/default/{ce-dev.drush.yml.j2 => local.drush.yml.j2} (100%) rename templates/drupal9/ce-dev/ansible/web/sites/default/{ce-dev.settings.php.j2 => local.settings.php.j2} (68%) diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 0826731..bf91f03 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -14,7 +14,7 @@ # This actually does not take any backup, but is needed to populate settings.php. - mysql_backup: handling: none - credentials_handling: static + credentials_handling: manual # A list of Drupal sites (for multisites). - drupal: sites: @@ -35,17 +35,25 @@ no_dev: false working_dir: "{{ deploy_path }}" apcu_autoloader: false + - drush: + use_vendor: true + - drush_bin: "{{ deploy_path }}/vendor/drush/drush/drush" + - lhci_run: + # Create a list of URLs to test with LHCI + test_urls: + - "https://{{ _domain_name }}" pre_tasks: # You can safely remove these steps once you have a working composer.json. - name: Download composer file. - get_url: + ansible.builtin.get_url: url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. - command: - cmd: composer require drush/drush:11.* - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: drush/drush:11.* + working_dir: "{{ deploy_path }}" roles: - _init # Sets some variables the deploy scripts rely on. - composer # Composer install step. @@ -54,4 +62,5 @@ # - sync/database_sync # Grab database from a remote server. - database_apply # Run drush updb and config import. - _exit # Some common housekeeping. + - lhci_run {% endraw %} diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index ec0363e..59439d1 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -48,6 +48,8 @@ cli: true - lhci: enable_vnc: true + - nodejs: + version: 16.x {% endraw %} tasks: - apt: diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/local.drush.yml.j2 similarity index 100% rename from templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2 rename to templates/drupal9/ce-dev/ansible/web/sites/default/local.drush.yml.j2 diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 similarity index 68% rename from templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 rename to templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 index d5eb492..82c8a8f 100644 --- a/templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 +++ b/templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 @@ -4,10 +4,11 @@ * Include default settings. */ require __DIR__ . '/default.settings.php'; + /** - * Include local dev settings. + * Include default local dev settings. */ -require DRUPAL_ROOT . '/sites/example.settings.local.php' +require DRUPAL_ROOT . '/sites/example.settings.local.php'; $databases['default']['default'] = array ( 'database' => '{{ build_databases[0].name }}', @@ -22,8 +23,11 @@ $databases['default']['default'] = array ( $settings['file_private_path'] = '{{ build_private_file_path }}'; $settings['file_public_path'] = '{{ build_public_file_path }}'; - -// Drupal < 8.8 -$config_directories['sync'] = '{{ build_config_sync_directory }}'; -// Drupal 8.8 $settings['config_sync_directory'] = '{{ build_config_sync_directory }}'; + +/** + * Load local development override configuration, if available. + */ +if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { + include $app_root . '/' . $site_path . '/settings.local.php'; +} From 60460926cea8705d218e55541d1aac1d729ddd99 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Wed, 14 Sep 2022 16:05:12 +0200 Subject: [PATCH 15/39] Release 1.1.23 (#97) --- RELEASE | 9 +++++++-- package.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index ec9f751..1bdd6ca 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,7 @@ -1.1.22 -Drupal 9 template building. +1.1.23 +Changed credentials_handling to manual, to generate ce-dev and root as user/password instead of a random string. +Using vendor/drush as drush instead of the phar file. +Included lhci_run as role in the deploy step, with one tests for the homepage. +Using full command paths to define pre/post_tasks +Renamed the settings and drush templates inside ansible/web/site/default +Removed the pre_tasks in provision.yml to uninstall nodejs 12. diff --git a/package.json b/package.json index 02d87ff..454e992 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.22", + "version": "1.1.23", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 2dc8b599b11aa8f908e53fc59c7485c919ed6362 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:53:09 +0200 Subject: [PATCH 16/39] Bump minimist from 1.2.5 to 1.2.6 (#79) Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d9eeed9..b5532cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1586,9 +1586,9 @@ minimatch@^3.0.4: brace-expansion "^1.1.7" minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mkdirp-classic@^0.5.2: version "0.5.3" From dd597b815d2a4509265e30035f9643a02edf8cec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:54:41 +0200 Subject: [PATCH 17/39] Bump ansi-regex from 3.0.0 to 3.0.1 (#84) Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b5532cf..ae35f8b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -357,9 +357,9 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: type-fest "^0.11.0" ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^4.1.0: version "4.1.0" From 4f0e659ff35ef3d9996ebcf76acde1a0f292b389 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 16:00:41 +0200 Subject: [PATCH 18/39] Bump moment from 2.27.0 to 2.29.4 (#85) Bumps [moment](https://github.com/moment/moment) from 2.27.0 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.27.0...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ae35f8b..4452707 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1603,9 +1603,9 @@ mkdirp@^0.5.1: minimist "^1.2.5" moment@^2.22.1: - version "2.27.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" - integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== + version "2.29.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== ms@^2.1.1: version "2.1.2" From 2dc648cc1efb9f9d9a77acadfba3952871f522dc Mon Sep 17 00:00:00 2001 From: gregharvey Date: Thu, 15 Sep 2022 16:21:19 +0200 Subject: [PATCH 19/39] Changing 'set-current' choice to a valid one. --- .github/workflows/ce-dev-publish-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ce-dev-publish-docs.yml b/.github/workflows/ce-dev-publish-docs.yml index 882fd8b..d7c0b3f 100644 --- a/.github/workflows/ce-dev-publish-docs.yml +++ b/.github/workflows/ce-dev-publish-docs.yml @@ -41,10 +41,10 @@ jobs: git clone https://github.com/codeenigma/wikis2pages.git cd wikis2pages /bin/bash init.sh https://${{ secrets.GITHUB_TOKEN }}@github.com/codeenigma/ce-dev.git 1.x - /bin/sh set-current.sh ce-dev-1.x + /bin/sh set-current.sh ce-dev-local docker exec --user ce-dev --workdir /home/ce-dev/deploy/live.local wikis2pages-hugo hugo /bin/sh .github-actions-push.sh - cd /home/runner/wikis2pages/public/ce-dev-1.x + cd /home/runner/wikis2pages/public/ce-dev-local git remote add ci https://${{ secrets.DOCS_GITHUB_TOKEN }}@github.com/codeenigma/ce-dev-docs.git git push ci master shell: bash From 8434c0d8190dfde1b31b4696b689ac4dc3facf0b Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 14 Apr 2023 15:56:56 +0200 Subject: [PATCH 20/39] Fixing ce_provision vars in container builds. (#102) --- docker-images/controller-ci/provision.yml | 3 +++ docker-images/controller/provision.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker-images/controller-ci/provision.yml b/docker-images/controller-ci/provision.yml index a385bf8..5a44df5 100644 --- a/docker-images/controller-ci/provision.yml +++ b/docker-images/controller-ci/provision.yml @@ -18,5 +18,8 @@ local_dir: /home/controller/ce-provision groups: [] galaxy_custom_requirements_file: "" + galaxy_roles_directory: "/home/{{ _ce_provision.username }}/.ansible/roles" + upgrade_galaxy: + enabled: false roles: - ce_provision diff --git a/docker-images/controller/provision.yml b/docker-images/controller/provision.yml index e26cd51..324436d 100644 --- a/docker-images/controller/provision.yml +++ b/docker-images/controller/provision.yml @@ -30,6 +30,9 @@ local_dir: /home/ce-dev/ce-provision groups: [] galaxy_custom_requirements_file: "" + galaxy_roles_directory: "/home/{{ _ce_provision.username }}/.ansible/roles" + upgrade_galaxy: + enabled: false roles: - ce_provision - ce_deploy From 0581adef2271380cbe9bbfefe641dcc8ec331431 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 14 Apr 2023 16:11:15 +0200 Subject: [PATCH 21/39] Adding variables pr 1.x (#104) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. --- docker-images/controller/provision.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-images/controller/provision.yml b/docker-images/controller/provision.yml index 324436d..b58da35 100644 --- a/docker-images/controller/provision.yml +++ b/docker-images/controller/provision.yml @@ -17,6 +17,9 @@ key_name: id_rsa.pub local_dir: /home/ce-dev/ce-deploy groups: [] + galaxy_custom_requirements_file: "" + upgrade_galaxy: + enabled: false - ce_provision: own_repository: https://github.com/codeenigma/ce-provision.git own_repository_branch: 1.x From fdc01d0c133721a3d3eddd50f359e1d7223e1f7f Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 14 Apr 2023 16:25:17 +0200 Subject: [PATCH 22/39] Adding variables pr 1.x (#106) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. --- .github/workflows/ce-dev-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ce-dev-build.yml b/.github/workflows/ce-dev-build.yml index d9c3601..da625f6 100644 --- a/.github/workflows/ce-dev-build.yml +++ b/.github/workflows/ce-dev-build.yml @@ -5,6 +5,9 @@ on: push: tags: - 1.* + workflow_dispatch: + tags: + - 1.* jobs: build: From dd3d9fc88ac84787c848093d729973e9ed1be208 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 14 Apr 2023 16:30:24 +0200 Subject: [PATCH 23/39] Adding variables pr 1.x (#109) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. --- docker-images/controller-ci/provision.yml | 2 ++ docker-images/controller/provision.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docker-images/controller-ci/provision.yml b/docker-images/controller-ci/provision.yml index 5a44df5..6527f4f 100644 --- a/docker-images/controller-ci/provision.yml +++ b/docker-images/controller-ci/provision.yml @@ -5,6 +5,8 @@ - _domain_name: ci.example.com - _ce_provision_build_tmp_dir: /tmp - _ce_provision_data_dir: /tmp + - _ce_provision: + username: ce-dev - is_local: true - _env_type: utility - ce_provision: diff --git a/docker-images/controller/provision.yml b/docker-images/controller/provision.yml index b58da35..3faaf4d 100644 --- a/docker-images/controller/provision.yml +++ b/docker-images/controller/provision.yml @@ -5,6 +5,8 @@ - _domain_name: example.com - _ce_provision_build_tmp_dir: /tmp - _ce_provision_data_dir: /tmp + - _ce_provision: + username: ce-dev - is_local: true - _env_type: utility - ce_deploy: @@ -16,6 +18,7 @@ new_user: true key_name: id_rsa.pub local_dir: /home/ce-dev/ce-deploy + ce_provision_dir: "/home/ce-dev/ce-provision" groups: [] galaxy_custom_requirements_file: "" upgrade_galaxy: From cd1345b351f902e282d887f7954b150b5d973db5 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Fri, 14 Apr 2023 17:27:21 +0200 Subject: [PATCH 24/39] Adding variables pr 1.x (#111) * Fixing ce_provision vars in container builds. * Fixing ce_deploy vars in container builds. * Adding the option to build manually the containers. * Still missing some vars. * Setting older version of Ubuntu for containers. --- .github/workflows/ce-dev-PR-test.yml | 2 +- .github/workflows/ce-dev-build.yml | 2 +- .github/workflows/ce-dev-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ce-dev-PR-test.yml b/.github/workflows/ce-dev-PR-test.yml index 9dd4099..cb3be05 100644 --- a/.github/workflows/ce-dev-PR-test.yml +++ b/.github/workflows/ce-dev-PR-test.yml @@ -5,7 +5,7 @@ on: pull_request jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Install modules diff --git a/.github/workflows/ce-dev-build.yml b/.github/workflows/ce-dev-build.yml index da625f6..877a199 100644 --- a/.github/workflows/ce-dev-build.yml +++ b/.github/workflows/ce-dev-build.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Install modules diff --git a/.github/workflows/ce-dev-test.yml b/.github/workflows/ce-dev-test.yml index 3474f04..9eb8fdc 100644 --- a/.github/workflows/ce-dev-test.yml +++ b/.github/workflows/ce-dev-test.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: From 7c9e1bc9cb122a1c29e587bc2193a5c5d7d09131 Mon Sep 17 00:00:00 2001 From: Kristjan Lilleoja Date: Wed, 17 May 2023 15:59:22 +0300 Subject: [PATCH 25/39] Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. --- .github/workflows/ce-dev-build.yml | 2 +- docs/GettingStarted.md | 2 +- docs/UserConfig.md | 4 ++-- install.sh | 2 +- src/base-cmd-abstract.ts | 6 +++--- src/commands/init.ts | 2 +- src/compose-config-service-interface.ts | 2 ++ src/controller-manager.ts | 8 +++++--- templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 2 ++ templates/blank/ce-dev/ce-dev.compose.yml.j2 | 4 +++- templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/drupal8/ce-dev/ce-dev.compose.yml.j2 | 2 ++ templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/drupal9/ce-dev/ce-dev.compose.yml.j2 | 2 ++ templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/localgov/ce-dev/ce-dev.compose.yml.j2 | 2 ++ 16 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ce-dev-build.yml b/.github/workflows/ce-dev-build.yml index 877a199..f39c9a5 100644 --- a/.github/workflows/ce-dev-build.yml +++ b/.github/workflows/ce-dev-build.yml @@ -37,7 +37,7 @@ jobs: mkdir -p ~/.config/ce-dev touch ~/.config/ce-dev/preferences-1.x.yml echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-1.x.yml - echo 'docker_compose_bin: docker-compose' >> ~/.config/ce-dev/preferences-1.x.yml + echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-1.x.yml echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-1.x.yml - name: Build and push Docker images run: | diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 7e7caf8..692b135 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -38,7 +38,7 @@ Next step is to start our containers. ce-dev start ``` What happened is: -- we called `docker-compose up` +- we called `docker compose up` - ensured file permissions, ownership and uid/gid match between your user on the host and the 'ce-dev' user within the container - started Unison file synchronisation - updated the /etc/hosts file on your laptop diff --git a/docs/UserConfig.md b/docs/UserConfig.md index 28db1c4..277572d 100644 --- a/docs/UserConfig.md +++ b/docs/UserConfig.md @@ -3,7 +3,7 @@ You can access a few global settings using `ce-dev config`. ## Binaries -You can alter the commands called for 'docker', 'docker-compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff ! +You can alter the commands called for 'docker', 'docker compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff ! ## SSH Username and Key -Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back. \ No newline at end of file +Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back. diff --git a/install.sh b/install.sh index 8f04ac2..1bd58a4 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ if [ -n "$(which ce-dev)" ]; then fi fi echo "Checking for dependencies..." -for BINARY in docker docker-compose mkcert; do +for BINARY in docker mkcert; do if [ -z "$(which "$BINARY")" ]; then echo "Could not find $BINARY" echo "Ensure it is installed and in your \$PATH" diff --git a/src/base-cmd-abstract.ts b/src/base-cmd-abstract.ts index 9bd86e2..eaa3195 100644 --- a/src/base-cmd-abstract.ts +++ b/src/base-cmd-abstract.ts @@ -34,7 +34,7 @@ export default abstract class BaseCmd extends Command { * @member * Docker-compose executable path. */ - protected dockerComposeBin = 'docker-compose' + protected dockerComposeBin = 'docker compose' /** * @member @@ -85,8 +85,8 @@ export default abstract class BaseCmd extends Command { docker_bin: this.config.platform === 'linux' ? 'sudo docker' : 'docker', docker_compose_bin: this.config.platform === 'linux' ? - 'sudo docker-compose' : - 'docker-compose', + 'sudo docker compose' : + 'docker compose', mkcert_bin: 'mkcert', ssh_user: process.env.USER as string, ssh_key: (process.env.HOME as string) + '/.ssh/id_rsa', diff --git a/src/commands/init.ts b/src/commands/init.ts index f048a09..e5a4770 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -298,7 +298,7 @@ export default class InitCmd extends BaseCmd { if (!service.volumes) { service.volumes = [] } - service.volumes.push('/sys/fs/cgroup:/sys/fs/cgroup:ro') + service.volumes.push('/sys/fs/cgroup:/sys/fs/cgroup:rw') service.volumes = [...new Set(service.volumes)] if (!service.cap_add) { service.cap_add = [] diff --git a/src/compose-config-service-interface.ts b/src/compose-config-service-interface.ts index 0296086..7046f39 100644 --- a/src/compose-config-service-interface.ts +++ b/src/compose-config-service-interface.ts @@ -6,6 +6,8 @@ import ComposeConfigServiceCeDev from './compose-config-service-ce-dev-interface export default interface ComposeConfigService { 'container_name'?: string; 'image'?: string; + 'platform'?: string; + 'cgroup'?: 'host' | 'private'; 'volumes'?: Array; 'expose'?: Array; 'ports'?: Array; diff --git a/src/controller-manager.ts b/src/controller-manager.ts index 9d51cc5..45391f9 100644 --- a/src/controller-manager.ts +++ b/src/controller-manager.ts @@ -17,9 +17,9 @@ export default class ControllerManager { /** * @member - * Docker-compose executable path. + * Docker compose executable path. */ - private readonly dockerComposeBin: string = 'docker-compose' + private readonly dockerComposeBin: string = 'docker compose' /** * @member @@ -236,6 +236,8 @@ export default class ControllerManager { ce_dev_controller: { container_name: 'ce_dev_controller', image: 'codeenigma/ce-dev-controller-1.x:latest', + platform: 'linux/amd64', + cgroup: 'host', hostname: 'ce_dev_controller', networks: { ce_dev: { @@ -248,7 +250,7 @@ export default class ControllerManager { 'ce_dev_apt_cache:/var/cache/apt/archives', 'ce_dev_composer_cache:/home/ce-dev/.composer/cache', 'ce_dev_nvm_node:/home/ce-dev/.nvm/versions/node', - '/sys/fs/cgroup:/sys/fs/cgroup:ro', + '/sys/fs/cgroup:/sys/fs/cgroup:rw', this.config.cacheDir + ':/home/ce-dev/.ce-dev-cache', ], }, diff --git a/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 8b7f65c..f5d3afc 100644 --- a/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -11,6 +11,8 @@ x-ce_dev: services: {{ project_name }}: image: 'codeenigma/blank-blank:latest' + platform: linux/amd64 + cgroup: host cap_add: - NET_ADMIN x-ce_dev: diff --git a/templates/blank/ce-dev/ce-dev.compose.yml.j2 b/templates/blank/ce-dev/ce-dev.compose.yml.j2 index 5b7a321..a46e730 100644 --- a/templates/blank/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/blank/ce-dev/ce-dev.compose.yml.j2 @@ -2,7 +2,7 @@ version: "3.7" x-ce_dev: registry: localhost:5000 project_name: {{ project_name }} - provision: + provision: - ce-dev/ansible/provision.yml deploy: - ce-dev/ansible/deploy.yml @@ -11,6 +11,8 @@ x-ce_dev: services: {{ project_name }}: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host cap_add: - NET_ADMIN x-ce_dev: diff --git a/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..5deacf3 100644 --- a/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal8-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal8-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 b/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 diff --git a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 index c1f83bb..800bd4a 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal9-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal9-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 diff --git a/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..5deacf3 100644 --- a/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal8-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal8-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/localgov/ce-dev/ce-dev.compose.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/localgov/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 From 2c8d2ffe63de37be499434c9d41db4c82353bc2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 13:35:05 +0200 Subject: [PATCH 26/39] Bump minimatch from 3.0.4 to 3.1.2 (#107) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4452707..099a829 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1579,9 +1579,9 @@ mimic-fn@^2.1.0: integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" From c884a4fc90dbad53535a1592038a615565c82b3e Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Thu, 18 May 2023 18:16:25 +0200 Subject: [PATCH 27/39] Cgroup fixes pr 1.x (#115) * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. * Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' parameter. (#113) * Documentation update for docker composer v2. * Temporarily disabling LHCI for Drupal 9 due to an HTML issue. * Preparing release of 1.2.0. * Updating release version in package.json. * Updating yarn dependencies. * Committing package-lock.json (new file with newer node versions). * Revert "Committing package-lock.json (new file with newer node versions)." This reverts commit 8912d3d503d350039a15084a5e8b517b0969dbe0. * Revert "Updating yarn dependencies." This reverts commit 94be4ab5ca7ba85698ba61071e84d31d69e030be. --------- Co-authored-by: Kristjan Lilleoja Co-authored-by: Kristjan Lilleoja --- .github/workflows/ce-dev-build.yml | 2 +- README.md | 4 ++-- RELEASE | 9 ++------- docs/Commands.md | 16 ++++++++-------- docs/GettingStarted.md | 4 ++-- docs/Install.md | 7 ++++--- docs/UserConfig.md | 4 ++-- install.sh | 2 +- package.json | 2 +- src/base-cmd-abstract-docker-images.ts | 2 +- src/base-cmd-abstract.ts | 8 ++++---- src/commands/build.ts | 6 +++--- src/commands/destroy.ts | 8 ++++---- src/commands/init.ts | 4 ++-- src/commands/start.ts | 4 ++-- src/commands/stop.ts | 2 +- src/compose-config-service-interface.ts | 2 ++ src/controller-manager.ts | 8 +++++--- .../blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 | 2 ++ templates/blank/ce-dev/ce-dev.compose.yml.j2 | 4 +++- templates/create.yml | 4 ++-- templates/drupal8/ce-dev/ansible/deploy.yml.j2 | 2 +- .../ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/drupal8/ce-dev/ce-dev.compose.yml.j2 | 2 ++ templates/drupal9/ce-dev/ansible/deploy.yml.j2 | 4 ++-- .../ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/drupal9/ce-dev/ce-dev.compose.yml.j2 | 2 ++ templates/localgov/ce-dev/ansible/deploy.yml.j2 | 2 +- .../ce-dev/ce-dev.compose.prebuilt.yml.j2 | 3 +++ templates/localgov/ce-dev/ce-dev.compose.yml.j2 | 2 ++ 30 files changed, 73 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ce-dev-build.yml b/.github/workflows/ce-dev-build.yml index 877a199..f39c9a5 100644 --- a/.github/workflows/ce-dev-build.yml +++ b/.github/workflows/ce-dev-build.yml @@ -37,7 +37,7 @@ jobs: mkdir -p ~/.config/ce-dev touch ~/.config/ce-dev/preferences-1.x.yml echo 'docker_bin: docker' > ~/.config/ce-dev/preferences-1.x.yml - echo 'docker_compose_bin: docker-compose' >> ~/.config/ce-dev/preferences-1.x.yml + echo 'docker_compose_bin: docker compose' >> ~/.config/ce-dev/preferences-1.x.yml echo 'mkcert_bin: mkcert' >> ~/.config/ce-dev/preferences-1.x.yml - name: Build and push Docker images run: | diff --git a/README.md b/README.md index 3be2db0..8d5f2a4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A local stack based on Docker Compose and Ansible. It aims to be easy to use but - HTTPS support through [mkcert](https://github.com/FiloSottile/mkcert) - Built-in Unison sync to avoid bind mount slowness on Mac OS - Easily build and push ready made images from running containers for you project -- Only defines a few simple commands, and defers to docker-compose and Ansible beyond that +- Only defines a few simple commands, and defers to `docker compose` and Ansible beyond that ## [Documentation](https://codeenigma.github.io/ce-dev-docs/1.x/home/) -## [Install](https://codeenigma.github.io/ce-dev-docs/1.x/install/) \ No newline at end of file +## [Install](https://codeenigma.github.io/ce-dev-docs/1.x/install/) diff --git a/RELEASE b/RELEASE index 1bdd6ca..b0013e4 100644 --- a/RELEASE +++ b/RELEASE @@ -1,7 +1,2 @@ -1.1.23 -Changed credentials_handling to manual, to generate ce-dev and root as user/password instead of a random string. -Using vendor/drush as drush instead of the phar file. -Included lhci_run as role in the deploy step, with one tests for the homepage. -Using full command paths to define pre/post_tasks -Renamed the settings and drush templates inside ansible/web/site/default -Removed the pre_tasks in provision.yml to uninstall nodejs 12. +1.2.0 +Migrated to using docker compose v2 or higher. diff --git a/docs/Commands.md b/docs/Commands.md index f91072b..baedf4d 100644 --- a/docs/Commands.md +++ b/docs/Commands.md @@ -57,21 +57,21 @@ _See code: [src/commands/browse.ts](https://github.com/codeenigma/ce-dev/blob/v1 ## `ce-dev build` -Commit the existing containers as new docker images, and create a new docker-compose file referencing them. +Commit the existing containers as new docker images, and create a new docker compose file referencing them. ``` USAGE $ ce-dev build OPTIONS - -d, --destination=destination [default: ce-dev.compose.prebuilt.yml] Path to the output docker-compose file, relative + -d, --destination=destination [default: ce-dev.compose.prebuilt.yml] Path to the output docker compose file, relative to the project ce-dev folder. -h, --help show CLI help -r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template. - -t, --template=template [default: ce-dev.compose.yml] Path to a docker-compose template file, relative to the + -t, --template=template [default: ce-dev.compose.yml] Path to a docker compose template file, relative to the project ce-dev folder. WARNING: this must match the original one the project was constructed with. @@ -151,7 +151,7 @@ _See code: [src/commands/deploy.ts](https://github.com/codeenigma/ce-dev/blob/v1 ## `ce-dev destroy` -Destroy project's containers using docker-compose kill. +Destroy project's containers using docker compose kill. ``` USAGE @@ -194,7 +194,7 @@ USAGE OPTIONS -h, --help show CLI help - -t, --template=template [default: ce-dev.compose.prebuilt.yml] path to a docker-compose template file, relative to + -t, --template=template [default: ce-dev.compose.prebuilt.yml] path to a docker compose template file, relative to the project root EXAMPLE @@ -231,7 +231,7 @@ OPTIONS -r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template. - -t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker-compose template file, relative to + -t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with. -u, --username=username Username to use to login against the Docker registry. @@ -259,7 +259,7 @@ OPTIONS -r, --registry=registry Docker registry to use. This overrides the one defined in the source compose template. - -t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker-compose template file, relative to + -t, --template=template [default: ce-dev.compose.prebuilt.yml] Path to a docker compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with. -u, --username=username Username to use to login against the Docker registry. @@ -292,7 +292,7 @@ _See code: [src/commands/shell.ts](https://github.com/codeenigma/ce-dev/blob/v1. ## `ce-dev start` -Spin up containers using docker-compose and update /etc/hosts file. +Spin up containers using docker compose and update /etc/hosts file. ``` USAGE diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 7e7caf8..6ebd89a 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -1,6 +1,6 @@ # Getting started -Note: this tutorial always refers to `docker` and `docker-compose`, never to `sudo docker` and `sudo docker-compose`, for readability. Adapt the commands accordingly for your setup. +Note: this tutorial always refers to `docker` and `docker compose`, never to `sudo docker` and `sudo docker compose`, for readability. Adapt the commands accordingly for your setup. We also use indifferently "host", "host machine", "laptop" or "workstation" to refer to the machine you're using ce-dev on; and "guest", "container" or "service" to refer to running containers. It will still work the same whether you actually use a laptop or not 😉 ## Quickstart @@ -38,7 +38,7 @@ Next step is to start our containers. ce-dev start ``` What happened is: -- we called `docker-compose up` +- we called `docker compose up` - ensured file permissions, ownership and uid/gid match between your user on the host and the 'ce-dev' user within the container - started Unison file synchronisation - updated the /etc/hosts file on your laptop diff --git a/docs/Install.md b/docs/Install.md index 928ad2c..e764159 100644 --- a/docs/Install.md +++ b/docs/Install.md @@ -13,17 +13,17 @@ We also assume common utilities are present: #### Docker -Follow the installation instructions for your distro from https://docs.docker.com/engine/install/. It is generally straightforward, except for users of [Fedora 31 and above](https://duckduckgo.com/?q=docker+fedora+32). +Follow the installation instructions for your distro from https://docs.docker.com/engine/install/. It is generally straightforward, except for users of [Fedora - more information here](https://fedoramagazine.org/docker-and-fedora-35/). **_Shall I `sudo docker` or `docker`?_** Most setup instructions you will find online instruct you to [add your user to the "docker" group](https://docs.docker.com/engine/install/linux-postinstall/) to be able to call docker as a standard user. There is a [non-neglectable risk](https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface) with that approach, even though it is far more convenient than being prompted for your password each and every step. -By default, ce-dev will assume you went the "safe" way and use `sudo docker` or `sudo docker-compose`, but you can change that in your [global configuration](userconfig). +By default, ce-dev will assume you went the "safe" way and use `sudo docker` or `sudo docker compose`, but you can change that in your [global configuration](userconfig). #### Docker Compose -Follow the installation instruction for your distro from https://docs.docker.com/compose/install/. +You will need Docker Compose v2 or higher. Linux users should install the `docker-compose-plugin` package from the Docker repository, if you do not have `docker compose` already: https://docs.docker.com/compose/install/linux/#install-using-the-repository #### mkcert @@ -92,6 +92,7 @@ Be sure to allow enough resources for it to run smoothly. There's no magic rule, - Be generous on RAM, but do not allocate it all for Docker. If you do not set a limit and you run a resource hungry service, everything, including processes on the hosts (think Electron apps, Chrome and the like, and by cascade the Docker processes themselves) will end up swapping and being ultra slow. 8GB or 10GB out of 16GB should be reasonable values. - Do not throttle CPU usage (ie, allocate them all). Or, go the other way round and allocate only one. This seems contradictory, but it looks like it behave diffently based on your hardware and/or OS version. In certain cases, containers seem to be unable to make use of more than one core anyway, so allocating more than one ends up being counter-productive as it will impede processes on the host. - Make sure you have enough disk space allocated for the VM Disk image. This again will vary on usage, but with a dozen of projects that have a 10GB database each, you're already well over 100GB. On the other hand, **_you can always grow the virtual disk afterward, but you can NOT shrink it without destroying all containers and volumes_**, so you can start small and grow it as needed if you encounter some "no space left on device/disk full" errors. +- You might want to turn on the "Use Rosetta for x86/amd64 emulation on Apple Silicon" option in Docker under "Features in development". This speeds up the emulation significantly. [![Docker Desktop setting pane](uploads/docker-mac-settings.png)](uploads/docker-mac-settings.png) diff --git a/docs/UserConfig.md b/docs/UserConfig.md index 28db1c4..277572d 100644 --- a/docs/UserConfig.md +++ b/docs/UserConfig.md @@ -3,7 +3,7 @@ You can access a few global settings using `ce-dev config`. ## Binaries -You can alter the commands called for 'docker', 'docker-compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff ! +You can alter the commands called for 'docker', 'docker compose' and 'mkcert'. This is mostly useful if you added your user to the 'docker' group on Linux and don't want to be prompted for your password. Or if you're doing funky stuff ! ## SSH Username and Key -Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back. \ No newline at end of file +Define the default username and private key to be used to be able to [SSH from containers to private resources](ssh), eg. cloning private repos or syncing environments back. diff --git a/install.sh b/install.sh index 8f04ac2..1bd58a4 100644 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ if [ -n "$(which ce-dev)" ]; then fi fi echo "Checking for dependencies..." -for BINARY in docker docker-compose mkcert; do +for BINARY in docker mkcert; do if [ -z "$(which "$BINARY")" ]; then echo "Could not find $BINARY" echo "Ensure it is installed and in your \$PATH" diff --git a/package.json b/package.json index 454e992..7d637ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.1.23", + "version": "1.2.0", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" diff --git a/src/base-cmd-abstract-docker-images.ts b/src/base-cmd-abstract-docker-images.ts index 2ca4051..7dc7122 100644 --- a/src/base-cmd-abstract-docker-images.ts +++ b/src/base-cmd-abstract-docker-images.ts @@ -8,7 +8,7 @@ export default abstract class DockerImagesCmd extends BaseCmd { help: flags.help({char: 'h'}), template: flags.string({ char: 't', - description: 'Path to a docker-compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with.', + description: 'Path to a docker compose template file, relative to the project root. WARNING: this must match the original one the project was constructed with.', default: 'ce-dev.compose.prebuilt.yml', }), username: flags.string({ diff --git a/src/base-cmd-abstract.ts b/src/base-cmd-abstract.ts index 9bd86e2..0e2ca9c 100644 --- a/src/base-cmd-abstract.ts +++ b/src/base-cmd-abstract.ts @@ -34,7 +34,7 @@ export default abstract class BaseCmd extends Command { * @member * Docker-compose executable path. */ - protected dockerComposeBin = 'docker-compose' + protected dockerComposeBin = 'docker compose' /** * @member @@ -85,8 +85,8 @@ export default abstract class BaseCmd extends Command { docker_bin: this.config.platform === 'linux' ? 'sudo docker' : 'docker', docker_compose_bin: this.config.platform === 'linux' ? - 'sudo docker-compose' : - 'docker-compose', + 'sudo docker compose' : + 'docker compose', mkcert_bin: 'mkcert', ssh_user: process.env.USER as string, ssh_key: (process.env.HOME as string) + '/.ssh/id_rsa', @@ -249,7 +249,7 @@ export default abstract class BaseCmd extends Command { * * @param file * Path to a file to parse - * @returns Parsed docker-compose declaration. + * @returns Parsed docker compose declaration. */ protected loadComposeConfig(file: string): ComposeConfig { // @todo Check config is valid. diff --git a/src/commands/build.ts b/src/commands/build.ts index 94ae2f7..d012074 100644 --- a/src/commands/build.ts +++ b/src/commands/build.ts @@ -7,7 +7,7 @@ import ux from 'cli-ux' const fspath = require('path') export default class BuildCmd extends BaseCmd { - static description = 'Commit the existing containers as new docker images, and create a new docker-compose file referencing them.' + static description = 'Commit the existing containers as new docker images, and create a new docker compose file referencing them.' static examples = [ '$ ce-dev build --template example.compose.yml', @@ -17,12 +17,12 @@ export default class BuildCmd extends BaseCmd { help: flags.help({char: 'h'}), template: flags.string({ char: 't', - description: 'Path to a docker-compose template file, relative to the project ce-dev folder. WARNING: this must match the original one the project was constructed with.', + description: 'Path to a docker compose template file, relative to the project ce-dev folder. WARNING: this must match the original one the project was constructed with.', default: 'ce-dev.compose.yml', }), destination: flags.string({ char: 'd', - description: 'Path to the output docker-compose file, relative to the project ce-dev folder.', + description: 'Path to the output docker compose file, relative to the project ce-dev folder.', default: 'ce-dev.compose.prebuilt.yml', }), registry: flags.string({ diff --git a/src/commands/destroy.ts b/src/commands/destroy.ts index b52a8a3..28a7511 100644 --- a/src/commands/destroy.ts +++ b/src/commands/destroy.ts @@ -5,7 +5,7 @@ import {flags} from '@oclif/command' import ux from 'cli-ux' export default class DestroyCmd extends BaseCmd { - static description = 'Destroy project\'s containers using docker-compose kill.' + static description = 'Destroy project\'s containers using docker compose kill.' static examples = [ '$ ce-dev destroy', @@ -39,13 +39,13 @@ export default class DestroyCmd extends BaseCmd { } /** - * Wrapper around docker-compose. + * Wrapper around docker compose. */ private down(): void { - ux.action.start('Killing containers with docker-compose kill') + ux.action.start('Killing containers with docker compose kill') execSync(this.dockerComposeBin + ' -p ' + this.activeProjectInfo.project_name + ' kill', {cwd: this.ceDevDir, stdio: 'inherit'}) ux.action.stop() - ux.action.start('Remove containers and anonymous volumes with docker-compose rm') + ux.action.start('Remove containers and anonymous volumes with docker compose rm') execSync(this.dockerComposeBin + ' -p ' + this.activeProjectInfo.project_name + ' rm -v --force', {cwd: this.ceDevDir, stdio: 'inherit'}) ux.action.stop() } diff --git a/src/commands/init.ts b/src/commands/init.ts index f048a09..28c062b 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -21,7 +21,7 @@ export default class InitCmd extends BaseCmd { help: flags.help({char: 'h'}), template: flags.string({ char: 't', - description: 'path to a docker-compose template file, relative to the project root', + description: 'path to a docker compose template file, relative to the project root', default: 'ce-dev.compose.prebuilt.yml', }), } @@ -298,7 +298,7 @@ export default class InitCmd extends BaseCmd { if (!service.volumes) { service.volumes = [] } - service.volumes.push('/sys/fs/cgroup:/sys/fs/cgroup:ro') + service.volumes.push('/sys/fs/cgroup:/sys/fs/cgroup:rw') service.volumes = [...new Set(service.volumes)] if (!service.cap_add) { service.cap_add = [] diff --git a/src/commands/start.ts b/src/commands/start.ts index 6de946a..0375ef4 100644 --- a/src/commands/start.ts +++ b/src/commands/start.ts @@ -8,7 +8,7 @@ const fs = require('fs') const readline = require('readline') export default class StartCmd extends BaseCmd { - static description = 'Spin up containers using docker-compose and update /etc/hosts file.' + static description = 'Spin up containers using docker compose and update /etc/hosts file.' static examples = [ '$ ce-dev start', @@ -143,7 +143,7 @@ export default class StartCmd extends BaseCmd { } /** - * Wrapper around docker-compose. + * Wrapper around docker compose. */ private up(): void { const running = this.getProjectRunningContainers() diff --git a/src/commands/stop.ts b/src/commands/stop.ts index 9d6d052..7b8ba56 100644 --- a/src/commands/stop.ts +++ b/src/commands/stop.ts @@ -19,7 +19,7 @@ export default class StopCmd extends BaseCmd { */ async run(): Promise { this.ensureActiveComposeFile() - ux.action.start('Stopping running containers with docker-compose stop') + ux.action.start('Stopping running containers with docker compose stop') execSync(this.dockerComposeBin + ' -p ' + this.activeProjectInfo.project_name + ' stop', {cwd: this.ceDevDir}) this.stopControllerContainer() ux.action.stop() diff --git a/src/compose-config-service-interface.ts b/src/compose-config-service-interface.ts index 0296086..7046f39 100644 --- a/src/compose-config-service-interface.ts +++ b/src/compose-config-service-interface.ts @@ -6,6 +6,8 @@ import ComposeConfigServiceCeDev from './compose-config-service-ce-dev-interface export default interface ComposeConfigService { 'container_name'?: string; 'image'?: string; + 'platform'?: string; + 'cgroup'?: 'host' | 'private'; 'volumes'?: Array; 'expose'?: Array; 'ports'?: Array; diff --git a/src/controller-manager.ts b/src/controller-manager.ts index 9d51cc5..45391f9 100644 --- a/src/controller-manager.ts +++ b/src/controller-manager.ts @@ -17,9 +17,9 @@ export default class ControllerManager { /** * @member - * Docker-compose executable path. + * Docker compose executable path. */ - private readonly dockerComposeBin: string = 'docker-compose' + private readonly dockerComposeBin: string = 'docker compose' /** * @member @@ -236,6 +236,8 @@ export default class ControllerManager { ce_dev_controller: { container_name: 'ce_dev_controller', image: 'codeenigma/ce-dev-controller-1.x:latest', + platform: 'linux/amd64', + cgroup: 'host', hostname: 'ce_dev_controller', networks: { ce_dev: { @@ -248,7 +250,7 @@ export default class ControllerManager { 'ce_dev_apt_cache:/var/cache/apt/archives', 'ce_dev_composer_cache:/home/ce-dev/.composer/cache', 'ce_dev_nvm_node:/home/ce-dev/.nvm/versions/node', - '/sys/fs/cgroup:/sys/fs/cgroup:ro', + '/sys/fs/cgroup:/sys/fs/cgroup:rw', this.config.cacheDir + ':/home/ce-dev/.ce-dev-cache', ], }, diff --git a/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 8b7f65c..f5d3afc 100644 --- a/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/blank/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -11,6 +11,8 @@ x-ce_dev: services: {{ project_name }}: image: 'codeenigma/blank-blank:latest' + platform: linux/amd64 + cgroup: host cap_add: - NET_ADMIN x-ce_dev: diff --git a/templates/blank/ce-dev/ce-dev.compose.yml.j2 b/templates/blank/ce-dev/ce-dev.compose.yml.j2 index 5b7a321..a46e730 100644 --- a/templates/blank/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/blank/ce-dev/ce-dev.compose.yml.j2 @@ -2,7 +2,7 @@ version: "3.7" x-ce_dev: registry: localhost:5000 project_name: {{ project_name }} - provision: + provision: - ce-dev/ansible/provision.yml deploy: - ce-dev/ansible/deploy.yml @@ -11,6 +11,8 @@ x-ce_dev: services: {{ project_name }}: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host cap_add: - NET_ADMIN x-ce_dev: diff --git a/templates/create.yml b/templates/create.yml index 13365b5..e6dafa0 100644 --- a/templates/create.yml +++ b/templates/create.yml @@ -10,11 +10,11 @@ command: git init args: chdir: "/home/ce-dev/.ce-dev-cache/{{ project_name }}" - - name: Generate docker-compose template. + - name: Generate docker compose template. template: src: "{{ project_type }}/ce-dev/ce-dev.compose.yml.j2" dest: "/home/ce-dev/.ce-dev-cache/{{ project_name }}/ce-dev/ce-dev.compose.yml" - - name: Generate docker-compose prebuilt template. + - name: Generate docker compose prebuilt template. template: src: "{{ project_type }}/ce-dev/ce-dev.compose.prebuilt.yml.j2" dest: "/home/ce-dev/.ce-dev-cache/{{ project_name }}/ce-dev/ce-dev.compose.prebuilt.yml" diff --git a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 index b187628..bf411e6 100644 --- a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 @@ -9,7 +9,7 @@ - _env_type: dev {% raw %} - _domain_name: www.{{ project_name }}.local - # Path to your project root. This must match the "volume" set in the docker-compose template. + # Path to your project root. This must match the "volume" set in the docker compose template. - deploy_path: /home/ce-dev/deploy/live.local # This actually does not take any backup, but is needed to populate settings.php. - mysql_backup: diff --git a/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..5deacf3 100644 --- a/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal8/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal8-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal8-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 b/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/drupal8/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index bf91f03..6eab502 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -9,7 +9,7 @@ - _env_type: dev {% raw %} - _domain_name: www.{{ project_name }}.local - # Path to your project root. This must match the "volume" set in the docker-compose template. + # Path to your project root. This must match the "volume" set in the docker compose template. - deploy_path: /home/ce-dev/deploy/live.local # This actually does not take any backup, but is needed to populate settings.php. - mysql_backup: @@ -62,5 +62,5 @@ # - sync/database_sync # Grab database from a remote server. - database_apply # Run drush updb and config import. - _exit # Some common housekeeping. - - lhci_run +# - lhci_run # removing for now as something in D9 HTML breaks LHCI {% endraw %} diff --git a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 index c1f83bb..800bd4a 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal9-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal9-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/drupal9/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 diff --git a/templates/localgov/ce-dev/ansible/deploy.yml.j2 b/templates/localgov/ce-dev/ansible/deploy.yml.j2 index 96dea95..8637751 100644 --- a/templates/localgov/ce-dev/ansible/deploy.yml.j2 +++ b/templates/localgov/ce-dev/ansible/deploy.yml.j2 @@ -9,7 +9,7 @@ - _env_type: dev {% raw %} - _domain_name: www.{{ project_name }}.local - # Path to your project root. This must match the "volume" set in the docker-compose template. + # Path to your project root. This must match the "volume" set in the docker compose template. - deploy_path: /home/ce-dev/deploy/live.local # This actually does not take any backup, but is needed to populate settings.php. - mysql_backup: diff --git a/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 index 9902799..5deacf3 100644 --- a/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 +++ b/templates/localgov/ce-dev/ce-dev.compose.prebuilt.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: 'codeenigma/drupal8-web:latest' + platform: linux/amd64 + cgroup: host expose: - 443 - 80 @@ -35,5 +37,6 @@ services: - NET_ADMIN db: image: 'codeenigma/drupal8-db:latest' + platform: linux/amd64 environment: MYSQL_ROOT_PASSWORD: ce-dev diff --git a/templates/localgov/ce-dev/ce-dev.compose.yml.j2 b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 index 61cd6f7..f3fdccb 100644 --- a/templates/localgov/ce-dev/ce-dev.compose.yml.j2 +++ b/templates/localgov/ce-dev/ce-dev.compose.yml.j2 @@ -12,6 +12,8 @@ x-ce_dev: services: web: image: codeenigma/ce-dev-1.x:latest + platform: linux/amd64 + cgroup: host expose: - 443 - 80 From 6578ae9b0b0e421b062c27c7b368afd7b130d5ad Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Mon, 22 May 2023 16:24:09 +0200 Subject: [PATCH 28/39] Adding new required ce-provision rkhunter variable. (#119) --- templates/blank/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/drupal8/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/drupal9/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/localgov/ce-dev/ansible/provision.yml.j2 | 2 ++ 4 files changed, 8 insertions(+) diff --git a/templates/blank/ce-dev/ansible/provision.yml.j2 b/templates/blank/ce-dev/ansible/provision.yml.j2 index 1f1194c..4f1cd80 100644 --- a/templates/blank/ce-dev/ansible/provision.yml.j2 +++ b/templates/blank/ce-dev/ansible/provision.yml.j2 @@ -6,6 +6,8 @@ - project_name: {{ project_name }} - _domain_name: www.{{ project_name }}.local - _env_type: dev + - rkhunter: + allow_ssh_root_user: prohibit-password - lhci: enable_vnc: true - nodejs: diff --git a/templates/drupal8/ce-dev/ansible/provision.yml.j2 b/templates/drupal8/ce-dev/ansible/provision.yml.j2 index 2f75b3f..1cb1a92 100644 --- a/templates/drupal8/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/provision.yml.j2 @@ -4,6 +4,8 @@ - _domain_name: www.{{ project_name }}.local - _env_type: dev - project_name: {{ project_name }} + - rkhunter: + allow_ssh_root_user: prohibit-password - mysql_client: host: {{ project_name }}-db user: root diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 59439d1..1c252ef 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -4,6 +4,8 @@ - _domain_name: www.{{ project_name }}.local - _env_type: dev - project_name: {{ project_name }} + - rkhunter: + allow_ssh_root_user: prohibit-password - mysql_client: host: {{ project_name }}-db user: root diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 index 2f75b3f..1cb1a92 100644 --- a/templates/localgov/ce-dev/ansible/provision.yml.j2 +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -4,6 +4,8 @@ - _domain_name: www.{{ project_name }}.local - _env_type: dev - project_name: {{ project_name }} + - rkhunter: + allow_ssh_root_user: prohibit-password - mysql_client: host: {{ project_name }}-db user: root From fd04f9caa03f976f5973ef3e76a47ec717998903 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 10 Jul 2023 14:42:02 +0100 Subject: [PATCH 29/39] Issue 120: docker ps change, can no longer use --format *and* --quiet. (#122) --- src/base-cmd-abstract.ts | 2 +- src/commands/clean.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base-cmd-abstract.ts b/src/base-cmd-abstract.ts index 0e2ca9c..230a601 100644 --- a/src/base-cmd-abstract.ts +++ b/src/base-cmd-abstract.ts @@ -272,7 +272,7 @@ export default abstract class BaseCmd extends Command { projectContainers.push(service.container_name as string) } } - const running = execSync(this.dockerBin + ' ps --quiet --format={{.Names}}').toString() + const running = execSync(this.dockerBin + ' ps --format={{.Names}}').toString() const runningContainers = running.split('\n').filter(item => { if (item.length === 0) { return false diff --git a/src/commands/clean.ts b/src/commands/clean.ts index a93e812..eb0c053 100644 --- a/src/commands/clean.ts +++ b/src/commands/clean.ts @@ -44,7 +44,7 @@ export default class CleanCmd extends BaseCmd { * Prompts for user. */ private containerChoice(): Array { - const containers = execSync(this.dockerBin + ' ps -a --quiet --format={{.Names}}').toString() + const containers = execSync(this.dockerBin + ' ps -a --format={{.Names}}').toString() const containerNames = containers.split('\n').filter(item => { return (item.length > 0) }) From 0d25cfed5d879454585e803131104892f4411215 Mon Sep 17 00:00:00 2001 From: Dionisio Date: Mon, 10 Jul 2023 16:00:42 +0200 Subject: [PATCH 30/39] REL 1.2.1: Fix --quiet and --format use (#123) --- RELEASE | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE b/RELEASE index b0013e4..130ec84 100644 --- a/RELEASE +++ b/RELEASE @@ -1,2 +1,2 @@ -1.2.0 -Migrated to using docker compose v2 or higher. +1.2.1 +Fix docker ps --quiet and --format use (#120) diff --git a/package.json b/package.json index 7d637ef..47b098e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ce-dev", "description": "Local Stack wrapper tool", - "version": "1.2.0", + "version": "1.2.1", "author": " @pm98zz-c", "bin": { "ce-dev": "./bin/run" From 98e90525ba9649aa61b8203af5c901371c59f7a9 Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 11:45:12 +0200 Subject: [PATCH 31/39] Updating Drupal templates. --- templates/drupal8/ce-dev/ansible/deploy.yml.j2 | 11 ++++++----- templates/drupal9/ce-dev/ansible/deploy.yml.j2 | 2 +- templates/localgov/ce-dev/ansible/deploy.yml.j2 | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 index bf411e6..52689ee 100644 --- a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 @@ -38,14 +38,15 @@ pre_tasks: # You can safely remove these steps once you have a working composer.json. - name: Download composer file. - get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/8.8.x/composer.json + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/drupal/recommended-project/8.9.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. - command: - cmd: composer require drush/drush "^10.6.2" - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: drush/drush:10.* + working_dir: "{{ deploy_path }}" roles: - _init # Sets some variables the deploy scripts rely on. - composer # Composer install step. diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 6eab502..892fbae 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -46,7 +46,7 @@ # You can safely remove these steps once you have a working composer.json. - name: Download composer file. ansible.builtin.get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + url: https://raw.githubusercontent.com/drupal/recommended-project/9.5.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. diff --git a/templates/localgov/ce-dev/ansible/deploy.yml.j2 b/templates/localgov/ce-dev/ansible/deploy.yml.j2 index 8637751..e518179 100644 --- a/templates/localgov/ce-dev/ansible/deploy.yml.j2 +++ b/templates/localgov/ce-dev/ansible/deploy.yml.j2 @@ -39,7 +39,7 @@ # You can safely remove these steps once you have a working composer.json. - name: Download composer file. get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + url: https://raw.githubusercontent.com/drupal/recommended-project/10.1.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. From 9a03d041b5d9f07414a98f8c9228bcf1241e22a8 Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 11:57:23 +0200 Subject: [PATCH 32/39] Removing docs steps for ansible because they cannot work. --- .github/workflows/ce-provision-build-docs.yml | 48 ------ contribute/toc.sh | 140 ------------------ 2 files changed, 188 deletions(-) delete mode 100644 .github/workflows/ce-provision-build-docs.yml delete mode 100755 contribute/toc.sh diff --git a/.github/workflows/ce-provision-build-docs.yml b/.github/workflows/ce-provision-build-docs.yml deleted file mode 100644 index bbd1c64..0000000 --- a/.github/workflows/ce-provision-build-docs.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build docs - -# Run this workflow every time a new commit pushed to your repository -on: pull_request - -jobs: - # Set the job key. The key is displayed as the job name - # when a job name is not provided - build-docs: - # Name the Job - name: Build the documentation - # Set the type of machine to run on - runs-on: ubuntu-20.04 - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - if: ${{ github.event.pull_request.head.ref != 'documentation' }} - uses: actions/checkout@v2 - - # Configures global Git variables for committing - - name: Configure Git - run: | - git config --global user.email "sysadm@codeenigma.com" - git config --global user.name "Code Enigma CI" - - # Builds the docs - - name: Build documentation - if: ${{ github.event.pull_request.head.ref != 'documentation' }} - run: | - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git fetch - git checkout documentation - contribute/toc.sh - git add docs - git diff --quiet && git diff --staged --quiet || git commit -am 'GitHub Actions - Rebuilt documentation.' && git push origin documentation - shell: bash - - # Create docs pull request - - name: Create a documentation pull request - if: ${{ github.event.pull_request.head.ref != 'documentation' && github.event.pull_request.base.ref == '1.x' }} - uses: devops-infra/action-pull-request@v0.4.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: documentation - target_branch: ${{ github.event.pull_request.base.ref }} - title: Documentation update. - body: "**Automated pull request** created by GitHub Actions because of a documentation update." diff --git a/contribute/toc.sh b/contribute/toc.sh deleted file mode 100755 index face006..0000000 --- a/contribute/toc.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2094 -# shellcheck disable=SC2129 -IFS=$(printf '\n\t') -set -e -OWN_DIR=$(dirname "$0") -cd "$OWN_DIR" || exit 1 -OWN_DIR=$(git rev-parse --show-toplevel) -cd "$OWN_DIR" || exit 1 -OWN_DIR=$(pwd -P) - -# @param -# $1 string filepath -cp_role_page(){ - RELATIVE=$(realpath --relative-to="$OWN_DIR" "$(dirname "$1")") - if [ ! -d "$OWN_DIR/docs/$RELATIVE" ]; then - mkdir -p "$OWN_DIR/docs/$RELATIVE" - fi - cp "$1" "$OWN_DIR/docs/$RELATIVE.md" -} - -# @param -# $1 string folder -cp_single_page(){ - if [ ! -d "$OWN_DIR/docs/$1" ]; then - mkdir "$OWN_DIR/docs/$1" - fi - cp "$OWN_DIR/$1/README.md" "$OWN_DIR/docs/$1.md" -} - -# @param -# $1 (string) filename -parse_role_variables(){ - TMP_MD=$(mktemp) - WRITE=1 - # Ensure we have a trailing line. - echo "" >> "$1" - while read -r LINE; do - case $LINE in - '') - echo "$LINE" >> "$TMP_MD" - generate_role_variables "$1" - WRITE=0 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=1 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=0 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=1 - ;; - *) - if [ $WRITE = 1 ]; then - echo "$LINE" >> "$TMP_MD" - fi - ;; - esac - done < "$1" - printf '%s\n' "$(cat "$TMP_MD")" > "$1" - rm "$TMP_MD" -} - -# @param -# $1 (string) filename -generate_role_variables(){ - VAR_FILE="$(dirname "$1")/defaults/main.yml" - if [ -f "$VAR_FILE" ]; then - echo "## Default variables" >> "$TMP_MD" - echo '```yaml' >> "$TMP_MD" - cat "$VAR_FILE" >> "$TMP_MD" - echo "" >> "$TMP_MD" - echo '```' >> "$TMP_MD" - echo "" >> "$TMP_MD" - fi -} - -generate_roles_toc(){ - TMP_SIDEBAR=$(mktemp) - WRITE="true" - while read -r LINE; do - case $LINE in - " - [Roles](roles)") - echo "$LINE" >> "$TMP_SIDEBAR" - parse_roles_toc roles 2 - WRITE="false" - ;; - " -"*) - WRITE="true" - echo "$LINE" >> "$TMP_SIDEBAR" - ;; - *) - if [ "$WRITE" = "true" ]; then - echo "$LINE" >> "$TMP_SIDEBAR" - fi - ;; - esac - done < "$OWN_DIR/docs/_Sidebar.md" - mv "$TMP_SIDEBAR" "$OWN_DIR/docs/_Sidebar.md" -} - -parse_roles_toc(){ - ROLES=$(find "$OWN_DIR/$1" -mindepth 2 -maxdepth 2 -name "README.md" | sort) - for ROLE in $ROLES; do - WRITE="true" - INDENT=$(printf %$(($2 * 2))s) - RELATIVE=$(realpath --relative-to="$OWN_DIR" "$(dirname "$ROLE")") - while read -r LINE; do - case $LINE in - "# "*) - if [ "$WRITE" = "true" ]; then - TITLE=$(echo "$LINE" | cut -c 3-) - echo "$INDENT"" - [$TITLE](/$RELATIVE)" >> "$TMP_SIDEBAR" - WRITE="false" - fi - ;; - esac - done < "$ROLE" - parse_roles_toc "$RELATIVE" $(($2 + 1)) - done -} - -rm -rf "$OWN_DIR/docs/roles" -ROLE_PAGES=$(find "$OWN_DIR/roles" -name "README.md") -for ROLE_PAGE in $ROLE_PAGES; do - parse_role_variables "$ROLE_PAGE" -done -for ROLE_PAGE in $ROLE_PAGES; do - cp_role_page "$ROLE_PAGE" -done -generate_roles_toc - - -cp_single_page install -cp_single_page contribute -cp_single_page scripts \ No newline at end of file From 3f0346112b10c721203219293056c9990c77c64d Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 12:34:02 +0200 Subject: [PATCH 33/39] Suppressing unattended-upgrades. --- templates/blank/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/drupal8/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/drupal9/ce-dev/ansible/provision.yml.j2 | 2 ++ templates/localgov/ce-dev/ansible/provision.yml.j2 | 2 ++ 4 files changed, 8 insertions(+) diff --git a/templates/blank/ce-dev/ansible/provision.yml.j2 b/templates/blank/ce-dev/ansible/provision.yml.j2 index 4f1cd80..0e19d73 100644 --- a/templates/blank/ce-dev/ansible/provision.yml.j2 +++ b/templates/blank/ce-dev/ansible/provision.yml.j2 @@ -12,6 +12,8 @@ enable_vnc: true - nodejs: version: 14.x + - apt_unattended_upgrades: + enable: false tasks: - apt: update_cache: true diff --git a/templates/drupal8/ce-dev/ansible/provision.yml.j2 b/templates/drupal8/ce-dev/ansible/provision.yml.j2 index 1cb1a92..d9df833 100644 --- a/templates/drupal8/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/provision.yml.j2 @@ -46,6 +46,8 @@ cli: true - lhci: enable_vnc: true + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 1c252ef..3bfd917 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -52,6 +52,8 @@ enable_vnc: true - nodejs: version: 16.x + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 index 1cb1a92..d9df833 100644 --- a/templates/localgov/ce-dev/ansible/provision.yml.j2 +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -46,6 +46,8 @@ cli: true - lhci: enable_vnc: true + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: From fd7329562e817107b2620feedf17d20d0042607c Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 13:12:09 +0200 Subject: [PATCH 34/39] Adding composer plugins to Drupal 8 deployments. --- templates/drupal8/ce-dev/ansible/deploy.yml.j2 | 15 +++++++++++++++ templates/localgov/ce-dev/ansible/deploy.yml.j2 | 16 +++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 index 52689ee..ca4bf5c 100644 --- a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 @@ -42,6 +42,21 @@ url: https://raw.githubusercontent.com/drupal/recommended-project/8.9.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false + - name: Adding composer/installers plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.composer/installers true + working_dir: "{{ deploy_path }}" + - name: Adding drupal/core-composer-scaffold plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.drupal/core-composer-scaffold true + working_dir: "{{ deploy_path }}" + - name: Adding drupal/core-project-message plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.drupal/core-project-message true + working_dir: "{{ deploy_path }}" - name: Install drush. community.general.composer: command: require diff --git a/templates/localgov/ce-dev/ansible/deploy.yml.j2 b/templates/localgov/ce-dev/ansible/deploy.yml.j2 index e518179..6a7a660 100644 --- a/templates/localgov/ce-dev/ansible/deploy.yml.j2 +++ b/templates/localgov/ce-dev/ansible/deploy.yml.j2 @@ -38,18 +38,20 @@ pre_tasks: # You can safely remove these steps once you have a working composer.json. - name: Download composer file. - get_url: + ansible.builtin.get_url: url: https://raw.githubusercontent.com/drupal/recommended-project/10.1.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. - command: - cmd: composer require drush/drush:11.* - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: drush/drush:11.* + working_dir: "{{ deploy_path }}" - name: Install localgov. - command: - cmd: composer require localgovdrupal/localgov - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: localgovdrupal/localgov + working_dir: "{{ deploy_path }}" roles: - _init # Sets some variables the deploy scripts rely on. - composer # Composer install step. From 24a05060f678844b3d53bb36063ea97986fbd28d Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 13:49:29 +0200 Subject: [PATCH 35/39] Adding the phpcodesniffer plugin for D8. --- templates/drupal8/ce-dev/ansible/deploy.yml.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 index ca4bf5c..ee6e635 100644 --- a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 @@ -57,6 +57,11 @@ command: config arguments: allow-plugins.drupal/core-project-message true working_dir: "{{ deploy_path }}" + - name: Adding dealerdirect/phpcodesniffer-composer-installer plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.dealerdirect/phpcodesniffer-composer-installer true + working_dir: "{{ deploy_path }}" - name: Install drush. community.general.composer: command: require From 6ddcb4d567982ac2a76db60759d5d598475e10cb Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Tue, 18 Jul 2023 14:39:45 +0200 Subject: [PATCH 36/39] Drupal template fixes pr 1.x (#126) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. * Suppressing unattended-upgrades. * Adding composer plugins to Drupal 8 deployments. * Adding the phpcodesniffer plugin for D8. --- .github/workflows/ce-provision-build-docs.yml | 48 ------ contribute/toc.sh | 140 ------------------ .../blank/ce-dev/ansible/provision.yml.j2 | 2 + .../drupal8/ce-dev/ansible/deploy.yml.j2 | 31 +++- .../drupal8/ce-dev/ansible/provision.yml.j2 | 2 + .../drupal9/ce-dev/ansible/deploy.yml.j2 | 2 +- .../drupal9/ce-dev/ansible/provision.yml.j2 | 2 + .../localgov/ce-dev/ansible/deploy.yml.j2 | 18 ++- .../localgov/ce-dev/ansible/provision.yml.j2 | 2 + 9 files changed, 45 insertions(+), 202 deletions(-) delete mode 100644 .github/workflows/ce-provision-build-docs.yml delete mode 100755 contribute/toc.sh diff --git a/.github/workflows/ce-provision-build-docs.yml b/.github/workflows/ce-provision-build-docs.yml deleted file mode 100644 index bbd1c64..0000000 --- a/.github/workflows/ce-provision-build-docs.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Build docs - -# Run this workflow every time a new commit pushed to your repository -on: pull_request - -jobs: - # Set the job key. The key is displayed as the job name - # when a job name is not provided - build-docs: - # Name the Job - name: Build the documentation - # Set the type of machine to run on - runs-on: ubuntu-20.04 - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - if: ${{ github.event.pull_request.head.ref != 'documentation' }} - uses: actions/checkout@v2 - - # Configures global Git variables for committing - - name: Configure Git - run: | - git config --global user.email "sysadm@codeenigma.com" - git config --global user.name "Code Enigma CI" - - # Builds the docs - - name: Build documentation - if: ${{ github.event.pull_request.head.ref != 'documentation' }} - run: | - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git fetch - git checkout documentation - contribute/toc.sh - git add docs - git diff --quiet && git diff --staged --quiet || git commit -am 'GitHub Actions - Rebuilt documentation.' && git push origin documentation - shell: bash - - # Create docs pull request - - name: Create a documentation pull request - if: ${{ github.event.pull_request.head.ref != 'documentation' && github.event.pull_request.base.ref == '1.x' }} - uses: devops-infra/action-pull-request@v0.4.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: documentation - target_branch: ${{ github.event.pull_request.base.ref }} - title: Documentation update. - body: "**Automated pull request** created by GitHub Actions because of a documentation update." diff --git a/contribute/toc.sh b/contribute/toc.sh deleted file mode 100755 index face006..0000000 --- a/contribute/toc.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -# shellcheck disable=SC2094 -# shellcheck disable=SC2129 -IFS=$(printf '\n\t') -set -e -OWN_DIR=$(dirname "$0") -cd "$OWN_DIR" || exit 1 -OWN_DIR=$(git rev-parse --show-toplevel) -cd "$OWN_DIR" || exit 1 -OWN_DIR=$(pwd -P) - -# @param -# $1 string filepath -cp_role_page(){ - RELATIVE=$(realpath --relative-to="$OWN_DIR" "$(dirname "$1")") - if [ ! -d "$OWN_DIR/docs/$RELATIVE" ]; then - mkdir -p "$OWN_DIR/docs/$RELATIVE" - fi - cp "$1" "$OWN_DIR/docs/$RELATIVE.md" -} - -# @param -# $1 string folder -cp_single_page(){ - if [ ! -d "$OWN_DIR/docs/$1" ]; then - mkdir "$OWN_DIR/docs/$1" - fi - cp "$OWN_DIR/$1/README.md" "$OWN_DIR/docs/$1.md" -} - -# @param -# $1 (string) filename -parse_role_variables(){ - TMP_MD=$(mktemp) - WRITE=1 - # Ensure we have a trailing line. - echo "" >> "$1" - while read -r LINE; do - case $LINE in - '') - echo "$LINE" >> "$TMP_MD" - generate_role_variables "$1" - WRITE=0 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=1 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=0 - ;; - '') - echo "$LINE" >> "$TMP_MD" - WRITE=1 - ;; - *) - if [ $WRITE = 1 ]; then - echo "$LINE" >> "$TMP_MD" - fi - ;; - esac - done < "$1" - printf '%s\n' "$(cat "$TMP_MD")" > "$1" - rm "$TMP_MD" -} - -# @param -# $1 (string) filename -generate_role_variables(){ - VAR_FILE="$(dirname "$1")/defaults/main.yml" - if [ -f "$VAR_FILE" ]; then - echo "## Default variables" >> "$TMP_MD" - echo '```yaml' >> "$TMP_MD" - cat "$VAR_FILE" >> "$TMP_MD" - echo "" >> "$TMP_MD" - echo '```' >> "$TMP_MD" - echo "" >> "$TMP_MD" - fi -} - -generate_roles_toc(){ - TMP_SIDEBAR=$(mktemp) - WRITE="true" - while read -r LINE; do - case $LINE in - " - [Roles](roles)") - echo "$LINE" >> "$TMP_SIDEBAR" - parse_roles_toc roles 2 - WRITE="false" - ;; - " -"*) - WRITE="true" - echo "$LINE" >> "$TMP_SIDEBAR" - ;; - *) - if [ "$WRITE" = "true" ]; then - echo "$LINE" >> "$TMP_SIDEBAR" - fi - ;; - esac - done < "$OWN_DIR/docs/_Sidebar.md" - mv "$TMP_SIDEBAR" "$OWN_DIR/docs/_Sidebar.md" -} - -parse_roles_toc(){ - ROLES=$(find "$OWN_DIR/$1" -mindepth 2 -maxdepth 2 -name "README.md" | sort) - for ROLE in $ROLES; do - WRITE="true" - INDENT=$(printf %$(($2 * 2))s) - RELATIVE=$(realpath --relative-to="$OWN_DIR" "$(dirname "$ROLE")") - while read -r LINE; do - case $LINE in - "# "*) - if [ "$WRITE" = "true" ]; then - TITLE=$(echo "$LINE" | cut -c 3-) - echo "$INDENT"" - [$TITLE](/$RELATIVE)" >> "$TMP_SIDEBAR" - WRITE="false" - fi - ;; - esac - done < "$ROLE" - parse_roles_toc "$RELATIVE" $(($2 + 1)) - done -} - -rm -rf "$OWN_DIR/docs/roles" -ROLE_PAGES=$(find "$OWN_DIR/roles" -name "README.md") -for ROLE_PAGE in $ROLE_PAGES; do - parse_role_variables "$ROLE_PAGE" -done -for ROLE_PAGE in $ROLE_PAGES; do - cp_role_page "$ROLE_PAGE" -done -generate_roles_toc - - -cp_single_page install -cp_single_page contribute -cp_single_page scripts \ No newline at end of file diff --git a/templates/blank/ce-dev/ansible/provision.yml.j2 b/templates/blank/ce-dev/ansible/provision.yml.j2 index 4f1cd80..0e19d73 100644 --- a/templates/blank/ce-dev/ansible/provision.yml.j2 +++ b/templates/blank/ce-dev/ansible/provision.yml.j2 @@ -12,6 +12,8 @@ enable_vnc: true - nodejs: version: 14.x + - apt_unattended_upgrades: + enable: false tasks: - apt: update_cache: true diff --git a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 index bf411e6..ee6e635 100644 --- a/templates/drupal8/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/deploy.yml.j2 @@ -38,14 +38,35 @@ pre_tasks: # You can safely remove these steps once you have a working composer.json. - name: Download composer file. - get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/8.8.x/composer.json + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/drupal/recommended-project/8.9.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false + - name: Adding composer/installers plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.composer/installers true + working_dir: "{{ deploy_path }}" + - name: Adding drupal/core-composer-scaffold plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.drupal/core-composer-scaffold true + working_dir: "{{ deploy_path }}" + - name: Adding drupal/core-project-message plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.drupal/core-project-message true + working_dir: "{{ deploy_path }}" + - name: Adding dealerdirect/phpcodesniffer-composer-installer plugin to composer config. + community.general.composer: + command: config + arguments: allow-plugins.dealerdirect/phpcodesniffer-composer-installer true + working_dir: "{{ deploy_path }}" - name: Install drush. - command: - cmd: composer require drush/drush "^10.6.2" - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: drush/drush:10.* + working_dir: "{{ deploy_path }}" roles: - _init # Sets some variables the deploy scripts rely on. - composer # Composer install step. diff --git a/templates/drupal8/ce-dev/ansible/provision.yml.j2 b/templates/drupal8/ce-dev/ansible/provision.yml.j2 index 1cb1a92..d9df833 100644 --- a/templates/drupal8/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal8/ce-dev/ansible/provision.yml.j2 @@ -46,6 +46,8 @@ cli: true - lhci: enable_vnc: true + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 6eab502..892fbae 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -46,7 +46,7 @@ # You can safely remove these steps once you have a working composer.json. - name: Download composer file. ansible.builtin.get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + url: https://raw.githubusercontent.com/drupal/recommended-project/9.5.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 1c252ef..3bfd917 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -52,6 +52,8 @@ enable_vnc: true - nodejs: version: 16.x + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: diff --git a/templates/localgov/ce-dev/ansible/deploy.yml.j2 b/templates/localgov/ce-dev/ansible/deploy.yml.j2 index 8637751..6a7a660 100644 --- a/templates/localgov/ce-dev/ansible/deploy.yml.j2 +++ b/templates/localgov/ce-dev/ansible/deploy.yml.j2 @@ -38,18 +38,20 @@ pre_tasks: # You can safely remove these steps once you have a working composer.json. - name: Download composer file. - get_url: - url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/drupal/recommended-project/10.1.x/composer.json dest: "{{ deploy_path }}/composer.json" force: false - name: Install drush. - command: - cmd: composer require drush/drush:11.* - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: drush/drush:11.* + working_dir: "{{ deploy_path }}" - name: Install localgov. - command: - cmd: composer require localgovdrupal/localgov - chdir: "{{ deploy_path }}" + community.general.composer: + command: require + arguments: localgovdrupal/localgov + working_dir: "{{ deploy_path }}" roles: - _init # Sets some variables the deploy scripts rely on. - composer # Composer install step. diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 index 1cb1a92..d9df833 100644 --- a/templates/localgov/ce-dev/ansible/provision.yml.j2 +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -46,6 +46,8 @@ cli: true - lhci: enable_vnc: true + - apt_unattended_upgrades: + enable: false {% endraw %} tasks: - apt: From 45cdf8960971e05aca1252f33cb3842ec9d48bab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:33:06 +0200 Subject: [PATCH 37/39] Bump semver from 5.7.1 to 5.7.2 (#124) * Adding a Drupal 9 template to ce-dev. * Testing nodejs version change with blank template. * Incrementing version for release. * There's no drupal9 template for ce-deploy. * Bump semver from 5.7.1 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] * Updating Drupal templates. * Removing docs steps for ansible because they cannot work. --------- Signed-off-by: dependabot[bot] Co-authored-by: gregharvey Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 099a829..0eadd05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1543,6 +1543,13 @@ lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -1966,19 +1973,21 @@ safe-regex@^1.1.0: integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== "semver@2 || 3 || 4 || 5", semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.2.1, semver@^7.3.2: - version "7.3.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" - integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" shebang-command@^1.2.0: version "1.2.0" @@ -2416,6 +2425,11 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From f3472085581856c1188c442bf1fcae2c26a890e5 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Tue, 18 Jul 2023 18:41:53 +0200 Subject: [PATCH 38/39] Updating docs URL for CI to https. (#131) --- .wikis2pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wikis2pages.yml b/.wikis2pages.yml index f883060..afe6db5 100644 --- a/.wikis2pages.yml +++ b/.wikis2pages.yml @@ -2,7 +2,7 @@ ce-dev-local: src: https://github.com/codeenigma/ce-dev.git src_branch: 1.x src_subdir: 'docs' - dest: git@github.com:codeenigma/ce-dev-docs.git + dest: https://github.com/codeenigma/ce-dev-docs.git dest_branch: master dest_subdir: 1.x title: ce-dev @@ -17,4 +17,4 @@ ce-dev-travis: dest_subdir: 1.x title: ce-dev type: doc - base_url: https://codeenigma.github.io/ce-dev-docs/1.x \ No newline at end of file + base_url: https://codeenigma.github.io/ce-dev-docs/1.x From 2e7a4609f2cda712eb9cfb2f2d7bc753978480ce Mon Sep 17 00:00:00 2001 From: gregharvey Date: Tue, 18 Jul 2023 18:47:25 +0200 Subject: [PATCH 39/39] Updating PHP versions for templates. --- templates/drupal9/ce-dev/ansible/provision.yml.j2 | 2 +- templates/localgov/ce-dev/ansible/provision.yml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 3bfd917..2e99b23 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -36,7 +36,7 @@ upstreams: [] - php: version: - - 7.4 + - 8.0 cli: memory_limit: -1 _env_type: dev diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 index d9df833..f171a78 100644 --- a/templates/localgov/ce-dev/ansible/provision.yml.j2 +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -36,7 +36,7 @@ upstreams: [] - php: version: - - 7.4 + - 8.1 cli: memory_limit: -1 _env_type: dev