Skip to content

66912: Added Drupal 10 template #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5bee26c
Fix docker-compose v2 issue and re-release to include clamav role (#68)
nfawbert Jan 28, 2022
e42ebd1
Killing old ce-dev container when updating (#70)
nfawbert Feb 2, 2022
b0dc9d9
Added Drupal9 and Localgov templates (#73)
DionisioFG Mar 9, 2022
34ce84c
New release 1.1.19 (#75)
DionisioFG Mar 10, 2022
cae50ba
Updated package.json version: 1.1.19 (#77)
DionisioFG Mar 10, 2022
79372e7
New tag to fix repo key for Chrome (#83)
DionisioFG Jul 1, 2022
4fa738c
#CE-62820: Added support for composer '2.x' in Drupal 9 provision tem…
davids4 Sep 8, 2022
70954a3
REL 1.1.21: Using composer 2 with Drupal 9 by default (#92)
DionisioFG Sep 8, 2022
62e753e
Drupal template fixes pr 1.x (#94)
gregharvey Sep 9, 2022
710a4e3
CE-DEV: some updates and tweaks (#96)
DionisioFG Sep 14, 2022
6046092
Release 1.1.23 (#97)
DionisioFG Sep 14, 2022
2dc8b59
Bump minimist from 1.2.5 to 1.2.6 (#79)
dependabot[bot] Sep 15, 2022
dd597b8
Bump ansi-regex from 3.0.0 to 3.0.1 (#84)
dependabot[bot] Sep 15, 2022
4f0e659
Bump moment from 2.27.0 to 2.29.4 (#85)
dependabot[bot] Sep 15, 2022
2dc648c
Changing 'set-current' choice to a valid one.
gregharvey Sep 15, 2022
8434c0d
Fixing ce_provision vars in container builds. (#102)
gregharvey Apr 14, 2023
0581ade
Adding variables pr 1.x (#104)
gregharvey Apr 14, 2023
fdc01d0
Adding variables pr 1.x (#106)
gregharvey Apr 14, 2023
dd3d9fc
Adding variables pr 1.x (#109)
gregharvey Apr 14, 2023
cd1345b
Adding variables pr 1.x (#111)
gregharvey Apr 14, 2023
7c9e1bc
Fix setup on a Mac: use Docker Compose V2 with the new 'cgroup' param…
iKristjan May 17, 2023
2c8d2ff
Bump minimatch from 3.0.4 to 3.1.2 (#107)
dependabot[bot] May 18, 2023
8325116
Merge branch '1.x' of github.com:codeenigma/ce-dev into 1.x
gregharvey May 18, 2023
c884a4f
Cgroup fixes pr 1.x (#115)
gregharvey May 18, 2023
d4b8b37
Merge branch '1.x' of github.com:codeenigma/ce-dev into 1.x
gregharvey May 18, 2023
6578ae9
Adding new required ce-provision rkhunter variable. (#119)
gregharvey May 22, 2023
fd04f9c
Issue 120: docker ps change, can no longer use --format *and* --quiet…
galooph Jul 10, 2023
0d25cfe
REL 1.2.1: Fix --quiet and --format use (#123)
DionisioFG Jul 10, 2023
6ddcb4d
Drupal template fixes pr 1.x (#126)
gregharvey Jul 18, 2023
45cdf89
Bump semver from 5.7.1 to 5.7.2 (#124)
dependabot[bot] Jul 18, 2023
f347208
Updating docs URL for CI to https. (#131)
gregharvey Jul 18, 2023
9e6df79
Drupal template fixes pr 1.x (#133)
gregharvey Jul 18, 2023
2746cd5
Drupal template fixes pr 1.x (#135)
gregharvey Jul 18, 2023
06bf830
Drupal template fixes pr 1.x (#138)
gregharvey Jul 19, 2023
0ae2dc6
Packaging 1.2.2 with new Drupal templates.
gregharvey Jul 19, 2023
57de3cd
Drupal template fixes pr 1.x (#140)
gregharvey Jul 19, 2023
6e51555
Upgrading base container to bullseye-slim. (#141)
gregharvey Jul 20, 2023
c56b900
Adding release info.
gregharvey Jul 20, 2023
7534ce9
66912: Added Drupal10 template
DionisioFG Aug 29, 2023
ce11257
66912: Added post_tasks section
DionisioFG Aug 29, 2023
1d7cb0a
66912: Updated version to 1.2.4
DionisioFG Aug 29, 2023
4745707
Merge branch 'devel' into 66912_drupal10_MR_devel
DionisioFG Aug 29, 2023
411d72d
Merge branch 'devel' into 66912_drupal10_MR_devel
DionisioFG Aug 29, 2023
793393f
66912: Deleted HEAD added by error
DionisioFG Aug 29, 2023
2d66ed4
Merge branch '66912_drupal10_MR_devel' of github.com:codeenigma/ce-de…
DionisioFG Aug 29, 2023
88c9540
66912: Fixed drupal10 text
DionisioFG Aug 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.2.2
Releasing new Drupal templates.
1.2.4
Added Drupal 10 template.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ce-dev",
"description": "Local Stack wrapper tool",
"version": "1.2.2",
"version": "1.2.4",
"author": " @pm98zz-c",
"bin": {
"ce-dev": "./bin/run"
Expand Down
1 change: 1 addition & 0 deletions src/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class CreateCmd extends BaseCmd {
choices: [
'drupal8',
'drupal9',
'drupal10',
'localgov',
'blank',
],
Expand Down
2 changes: 2 additions & 0 deletions templates/drupal10/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
node_modules
2 changes: 2 additions & 0 deletions templates/drupal10/ce-dev/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.retry
docker-compose.yml
74 changes: 74 additions & 0 deletions templates/drupal10/ce-dev/ansible/deploy.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
# Template playbook for a local Drupal 10 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: manual
# 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
- 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.
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.
community.general.composer:
command: require
arguments: drush/drush:12.*
working_dir: "{{ deploy_path }}"
post_tasks:
- name: "Symlink global Drush"
ansible.builtin.file:
src: "{{ drush_bin }}"
dest: "/usr/local/bin/drush"
state: link
become: yes

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.
# - lhci_run # removing for now as something in D9 HTML breaks LHCI
{% endraw %}
74 changes: 74 additions & 0 deletions templates/drupal10/ce-dev/ansible/provision.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
- hosts: {{ project_name }}-web
become: true
vars:
- _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
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:
- 8.1
cli:
memory_limit: -1
_env_type: dev
fpm:
_env_type: dev
- php_composer:
version: ''
version_branch: '--2'
keep_updated: true
- xdebug:
cli: true
- lhci:
enable_vnc: true
- nodejs:
version: 18.x
- apt_unattended_upgrades:
enable: false
{% 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml

options:
uri: '{{ site.base_url }}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* Include default settings.
*/
require __DIR__ . '/default.settings.php';

/**
* Include default local dev settings.
*/
require DRUPAL_ROOT . '/sites/example.settings.local.php';

$databases['default']['default'] = array (
'database' => '{{ 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 }}';
$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';
}
42 changes: 42 additions & 0 deletions templates/drupal10/ce-dev/ce-dev.compose.prebuilt.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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/drupal10-web:latest'
platform: linux/amd64
cgroup: host
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/drupal10-db:latest'
platform: linux/amd64
environment:
MYSQL_ROOT_PASSWORD: ce-dev
41 changes: 41 additions & 0 deletions templates/drupal10/ce-dev/ce-dev.compose.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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
platform: linux/amd64
cgroup: host
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
7 changes: 7 additions & 0 deletions templates/drupal9/ce-dev/ansible/deploy.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
command: require
arguments: drush/drush:11.*
working_dir: "{{ deploy_path }}"
post_tasks:
- name: "Symlink global Drush"
ansible.builtin.file:
src: "{{ drush_bin }}"
dest: "/usr/local/bin/drush"
state: link
become: yes
roles:
- _init # Sets some variables the deploy scripts rely on.
- composer # Composer install step.
Expand Down
4 changes: 2 additions & 2 deletions templates/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Test project creation and pre-build image.
set -e
PROJECTS="blank drupal8 drupal9"
PROJECTS="blank drupal8 drupal9 drupal10"

# Common processing.
OWN_DIR=$(dirname "$0")
Expand Down Expand Up @@ -58,4 +58,4 @@ for PROJECT in $PROJECTS; do
if [ -n "$1" ] && [ "$1" = "--push" ]; then
push_project "$PROJECT"
fi
done
done