-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.x' into bullseye_upgrade-PR-1.x
- Loading branch information
Showing
13 changed files
with
285 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.retry | ||
docker-compose.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
4 changes: 4 additions & 0 deletions
4
templates/drupal10/ce-dev/ansible/web/sites/default/ce-dev.drush.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}' |
33 changes: 33 additions & 0 deletions
33
templates/drupal10/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters