This repository contains the source code for awakeningchurch.com and the associated development and production server infrastructure.
This project is based on Bedrock and Trellis by Roots.
The Bedrock based WordPress installation is in site/
and the
Trellis based server infrastructure is in trellis/
. For more
about how to understand these files, please see the Bedrock
and Trellis documentation.
brew install roots/tap/trellis-cli
cd trellis # Required to provision the correct VM, see .trellis/cli.yml
# Edit ansible.cfg to include IdentitiesOnly=yes SSH config
trellis vm start
# If provisioning fails, run:
trellis provision development
# Revert the changes to ansible.cfg to deploy to remote servers
If the provision fails, you can retry with a single tag to rerun just that part.
trellis provision --tags xdebug development
Due to known Lima VM issues with disk corruption, it is recommended to stop the VM before putting the computer to sleep.
trellis vm stop
trellis exec ./bin/sync.sh production awakeningchurch.com db down
trellis exec ./bin/sync.sh production awakeningchurch.com db up
We use G Workspace SSO for login which is not available in development. An easy alternative is to use magic login links:
trellis vm shell -- sudo -u vagrant sh -c 'wp login install --activate --yes'
trellis vm shell -- sudo -u vagrant sh -c "wp login as 'Reid Burke'"
trellis vm shell -- sudo -u vagrant sh -c 'composer update'
# WordPress upgrade example
trellis vm shell -- sudo -u vagrant sh -c 'composer upgrade roots/wordpress:^6.2 --with-all-dependencies'
Issues may include:
- Content-Length mismatch during WP-CLI install
- 404 when updating
trellis vm shell
sudo su vagrant
vi /home/vagrant/.composer/config.json
Apply config: https://gist.github.com/oanhnn/112f68e5b91a7dac7641bcd8b0ab13ac
{
"config": {
"github-protocols": [
"https,ssh"
]
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.org"
}
}
}
When composer fails with this error:
Library not loaded: /opt/homebrew/opt/libavif/lib/libavif.15.dylib
You need to reinstall gd
with brew reinstall gd
.
See: https://stackoverflow.com/a/77222642
You may have issues working with Azure DevOps repos if
you use more than one SSH key. Ensure you only have a
single valid IdentityFile for ssh.dev.azure.com
in
your ~/.ssh/config
. For more, see the Azure docs.
If you do not have this setup correctly, you may get this error during Composer install:
remote: Public key authentication failed.
MIT, see LICENSE.