2021-03-02 16:38:45 +00:00
|
|
|
# Wordpress
|
2020-05-02 22:21:33 +00:00
|
|
|
|
2020-12-14 10:28:46 +00:00
|
|
|
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/wordpress/status.svg)](https://drone.autonomic.zone/coop-cloud/wordpress)
|
2020-09-25 13:06:35 +00:00
|
|
|
|
2020-09-10 23:30:10 +00:00
|
|
|
Coöp Cloud + [Wordpress](https://wordpress.org) = 🥳
|
|
|
|
|
2021-03-02 16:38:45 +00:00
|
|
|
<!-- metadata -->
|
2021-05-10 05:09:52 +00:00
|
|
|
|
|
|
|
- **Category**: Apps
|
|
|
|
- **Status**: ❶💚
|
|
|
|
- **Image**: [`wordpress`](https://hub.docker.com/_/wordpress), ❶💚, upstream
|
|
|
|
- **Healthcheck**: Yes
|
|
|
|
- **Backups**: Yes
|
|
|
|
- **Email**: ❶💚
|
|
|
|
- **Tests**: ❷💛
|
|
|
|
- **SSO**: No
|
2021-03-02 16:38:45 +00:00
|
|
|
<!-- endmetadata -->
|
|
|
|
|
|
|
|
## Basic usage
|
|
|
|
|
2020-09-10 23:30:10 +00:00
|
|
|
1. Set up Docker Swarm and [`abra`][abra]
|
2020-12-14 10:28:46 +00:00
|
|
|
2. Deploy [`coop-cloud/traefik`][cc-traefik]
|
2021-03-02 16:38:45 +00:00
|
|
|
3. `abra app new wordpress --secrets` (optionally with `--pass` if you'd like
|
|
|
|
to save secrets in `pass`)
|
2020-12-14 10:28:46 +00:00
|
|
|
4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
|
2020-09-10 23:30:10 +00:00
|
|
|
your Docker swarm box
|
2021-05-10 05:09:52 +00:00
|
|
|
5. `abra app YOURAPPDOMAIN deploy`
|
|
|
|
6. Open the configured domain in your browser to finish set-up
|
|
|
|
7. `abra app YOURAPPDOMAIN run app chown www-data:www-data /var/www/html/wp-content` to fix
|
2020-09-17 21:45:01 +00:00
|
|
|
file permissions (see #3)
|
2020-09-10 23:30:10 +00:00
|
|
|
|
2020-12-14 10:31:17 +00:00
|
|
|
## Running WP-CLI
|
|
|
|
|
|
|
|
`abra app YOURAPPDOMAIN wp 'core check-update --major'`
|
|
|
|
|
|
|
|
(the WP-CLI arguments need to be quoted, because of how `abra` handles
|
|
|
|
command-line arguments)
|
|
|
|
|
2020-09-14 16:45:17 +00:00
|
|
|
## Network (Multi-site)
|
|
|
|
|
|
|
|
_(Only tested using subdomains)_
|
|
|
|
|
|
|
|
1. Set up as above
|
2020-12-14 10:28:46 +00:00
|
|
|
2. `abra app YOURAPPDOMAIN config`, and uncomment the first `# Multisite` section
|
|
|
|
3. `abra app YOURAPPDOMAIN 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 YOURAPPDOMAIN config` again - comment out the first `# Multisite`
|
|
|
|
section in `.envrc`, uncomment the `# Multisite phase 2` section, and add
|
|
|
|
your multisite subdomain(s) to `EXTRA_DOMAINS` (beware the weird syntax..)
|
|
|
|
7. `abra app YOURAPPDOMAIN deploy`
|
2020-09-14 16:45:17 +00:00
|
|
|
|
2020-09-14 17:28:31 +00:00
|
|
|
## Installing a custom theme
|
|
|
|
|
2020-12-14 10:28:46 +00:00
|
|
|
`abra app YOURAPPDOMAIN cp ~/path/to/local/theme wordpress:/var/www/html/wp-content/themes/`
|
2020-09-14 17:28:31 +00:00
|
|
|
|
2020-09-27 19:27:08 +00:00
|
|
|
## Email
|
|
|
|
|
2020-12-14 10:28:46 +00:00
|
|
|
1. Deploy [`postfix-relay`][cc-postfix-relay]
|
|
|
|
2. `abra app YOURAPPDOMAIN config`, 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 YOURAPPDOMAIN deploy`
|
2020-09-27 19:27:08 +00:00
|
|
|
|
2020-09-25 12:24:38 +00:00
|
|
|
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
2020-12-14 10:28:46 +00:00
|
|
|
[cc-traefik]: https://git.autonomic.zone/coop-cloud/traefik
|
2021-03-02 16:38:45 +00:00
|
|
|
[cc-postfix-relay]: https://git.autonomic.zone/coop-cloud/traefik
|