Drupal poject setup steps, for use in Lando environment.
lando init- Copy, adjust pertinent sections from provided
.lando.yml lando start
| #!/bin/bash | |
| # Looks for a JIRA style ticket name in the branch name, and prefixes the | |
| # commit message with the ticket, if found. | |
| # | |
| # If you're using the `git commit -m` style commit command, the issue number | |
| # will be prefixed without notice. | |
| # | |
| # If you use the standard `git commit` command where you're sent to an editor, | |
| # the issue number will appear as the default commit message in the editor. |
| #!/bin/sh | |
| MSG=$(head -n 1 $1) | |
| PATTERN='[A-Z]+-[0-9]+: .' | |
| # Allows us to read user input below, assigns stdin to keyboard | |
| exec < /dev/tty | |
| if [[ ! $MSG =~ $PATTERN ]]; then | |
| echo 'Commit message does not match the format "ABC-123: i did some stuff".' |
| #!/bin/sh | |
| # Run from /sites/default, etc. | |
| tar \ | |
| --exclude='files/private/backup_migrate'\ | |
| --exclude='files/css' \ | |
| --exclude='files/js' \ | |
| --exclude='files/styles' \ | |
| -zcvf files.tar.gz files/ |
| // Before you can do this, get http://brew.sh/ | |
| // Then get wget: brew install wget | |
| // | |
| // Grab an entire static archive of a site. (This might take a while) | |
| wget -mkEpnp http://sitename.com |
| name: example-site | |
| recipe: drupal8 | |
| config: | |
| php: '7.4' | |
| webroot: web | |
| xdebug: true | |
| tooling: | |
| behat: | |
| service: appserver | |
| cmd: |
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| exit | |
| fi | |
| lando terminus drush $1 -- updatedb -y --no-cache-clear && \ | |
| lando terminus drush $1 -- cache:rebuild && \ | |
| lando terminus drush $1 -- config:import -y && \ | |
| lando terminus drush $1 -- cache:rebuild |
| # View Apache setup. | |
| - name: Apache setup | |
| run: | | |
| echo '--- /etc/apache2 ---' | |
| sudo ls /etc/apache2 | |
| echo '--- /etc/apache2/conf-available ---' | |
| sudo ls /etc/apache2/conf-available | |
| echo '--- /etc/apache2/conf-enabled ---' | |
| sudo ls /etc/apache2/conf-enabled | |
| echo '--- /etc/apache2/mods-available ---' |