- compose.matrix.yml: add trailing newline
- compose.ftp-222*.yml: fix YAML indentation (8->6 spaces)
- entrypoint.sh.tmpl: fix SC2198 ([ -n "$@" ] -> [ $# -gt 0 ])
- All .tmpl files: migrate from {{ env }} to {{ getenv }} for gomplate v5 compat
- uploads.ini.tmpl: add {{- / -}} whitespace trimming, fix double-space typo
- tests/run.sh: only run ShellCheck on *.sh.tmpl files
- tests/test_shell.sh: gracefully skip if shellcheck not installed
- tests/test_templates.sh: remove dead render() function,
gracefully skip if gomplate not found, use set -a/. for env sourcing
- tests/test_compose_config.sh: validate override files combined
with compose.yml, skip partial snippets needing more context
- README.md: add test instructions with brew install
105 lines
2.7 KiB
Markdown
105 lines
2.7 KiB
Markdown
# Wordpress
|
|
|
|
[](https://build.coopcloud.tech/coop-cloud/wordpress)
|
|
|
|
Coöp Cloud + [Wordpress](https://wordpress.org) = 🥳
|
|
|
|
<!-- metadata -->
|
|
|
|
* **Category**: Apps
|
|
* **Status**: 4
|
|
* **Image**: [`wordpress`](https://hub.docker.com/_/wordpress), 4, upstream
|
|
* **Healthcheck**: Yes
|
|
* **Backups**: Yes
|
|
* **Email**: 3
|
|
* **Tests**: 2
|
|
* **SSO**: No
|
|
|
|
<!-- endmetadata -->
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
* `abra app new wordpress`
|
|
* `abra app config <app-name>`
|
|
* `abra app secret generate -a <app-name>`
|
|
* `abra app deploy <app-name>`
|
|
* `abra app cmd <app-name> app core_install`
|
|
|
|
### Authentik Integration
|
|
|
|
|
|
`abra app config <app-name>`
|
|
Configure the following envs:
|
|
```
|
|
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-name> app set_authentik`
|
|
|
|
## Running WP-CLI
|
|
|
|
`abra app cmd <app-name> app wp -- core check-update --major`
|
|
|
|
## Network (Multi-site)
|
|
|
|
1. Set up as above
|
|
2. `abra app config <app-name>`, and uncomment `#MULTISITE=enable`
|
|
3. `abra app deploy <app-name>`
|
|
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 <app-name>` again and set `MULTISITE` to either `subdomain` or `subfolder` depending on your setup.
|
|
7. `abra app deploy <app-name>`
|
|
|
|
## Installing a custom theme
|
|
|
|
`abra app cp <app-name> ~/path/to/local/theme wordpress:/var/www/html/wp-content/themes/`
|
|
|
|
## Email
|
|
|
|
There is a local or remote SMTP relay configuration available.
|
|
|
|
* **local**: `COMPOSE_FILE=compose.yml:compose.mailrelay.yml`
|
|
* **remote**: `COMPOSE_FILE=compose.yml:compose.mailrelay.yml:compose.smtp.yml`
|
|
|
|
Below are the instructions for the local relay.
|
|
|
|
1. Deploy [`postfix-relay`][cc-postfix-relay]
|
|
2. `abra app config <app-name>`, and uncomment the email lines; change
|
|
`MAIL_FROM` to make sure the domain is the same as `postfix-relay`'s
|
|
`$DOMAIN` or in its `$EXTRA_SENDER_DOMAINS`
|
|
3. `abra app deploy <app-name>`
|
|
|
|
## Tests
|
|
|
|
Run the full test suite:
|
|
|
|
```sh
|
|
bash tests/run.sh
|
|
```
|
|
|
|
### Prerequisites
|
|
|
|
The test suite uses several tools. Install them with:
|
|
|
|
```sh
|
|
brew install shellcheck gomplate
|
|
```
|
|
|
|
Or on Debian/Ubuntu:
|
|
|
|
```sh
|
|
sudo apt-get install shellcheck
|
|
# gomplate: https://github.com/hairyhenderson/gomplate/releases
|
|
```
|
|
|
|
Some tests skip gracefully if their dependencies are missing.
|
|
|
|
[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/traefik
|