diff --git a/README.md b/README.md index 7e3bd66..fbb4693 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,66 @@ Below are the instructions for the local relay. `$DOMAIN` or in its `$EXTRA_SENDER_DOMAINS` 3. `abra app deploy ` -[abra]: https://git.autonomic.zone/autonomic-cooperative/abra -[cc-traefik]: https://git.autonomic.zone/coop-cloud/traefik -[cc-postfix-relay]: https://git.autonomic.zone/coop-cloud/postfix-relay +## WP-CLI + +You can either run using `abra app cmd`: +```bash +abra app cmd app wp -- core check-update --major +``` + +Or by entering the app shell: +1. `abra app run app bash` +2. `su -s /bin/bash www-data -c "wp core check-update --major"` + +## Network (Multi-site) + +1. Set up as above +2. `abra app config `, and uncomment `#MULTISITE=enable` +3. `abra app deploy ` +4. Log into the WordPress admin dashboard, go to **Tools → Network Setup** +5. Don't worry about the suggested file changes +6. `abra app config ` again and set `MULTISITE` to either `subdomain` or `subfolder` depending on your setup. +7. `abra app deploy ` + +## Installing a custom theme + +`abra app cp ~/path/to/local/theme wordpress:/var/www/html/wp-content/themes/` + +## Authentik Integration + +Configure the following envs via `abra app config `: +```bash +COMPOSE_FILE="$COMPOSE_FILE:compose.authentik.yml" +AUTHENTIK_DOMAIN=authentik.example.com +AUTHENTIK_SECRET_NAME=authentik_example_com_wordpress_secret_v1 # the same as in authentik +AUTHENTIK_ID_NAME=authentik_example_com_wordpress_id_v1 # the same as in authentik +``` + +`abra app cmd app set_authentik` + +## Tests + +Run the full test suite for this repository: + +```sh +bash tests/run.sh +``` + +### Prerequisites + +The test suite uses several tools. Install them with your equivalent of: + +```sh +brew install shellcheck gomplate +``` +Some tests skip gracefully if their dependencies are missing. + +## Migrate from a non-Co-op Cloud WordPress install + +Make a `.tar.gz` backup of the site's `wp-content` dir and a `.sql.gz` backup of the database. + +1. `abra app wp.example.com restore app wp-content.tar.gz` +2. `abra app wp.example.com restore db wordpress.sql.gz` + +Lastly, if there's a domain name change, run a search and replace: +`abra app wp.example.com wp "search-replace https://old.example.com https://wp.example.com"`