2020-05-02 22:21:33 +00:00
|
|
|
# wordpress
|
|
|
|
|
2020-09-10 23:30:10 +00:00
|
|
|
Coöp Cloud + [Wordpress](https://wordpress.org) = 🥳
|
|
|
|
|
|
|
|
1. Set up Docker Swarm and [`abra`][abra]
|
|
|
|
2. Deploy [`compose-stacks/traefik`][compose-traefik]
|
|
|
|
3. `cp .envrc.sample .envrc`
|
|
|
|
4. Edit `.envrc` - be sure to change `$DOMAIN` to something that resolves to
|
|
|
|
your Docker swarm box
|
|
|
|
5. `direnv allow` (or `. .envrc`)
|
|
|
|
6. Generate secrets:
|
|
|
|
```
|
|
|
|
abra secret_generate db_password v1
|
|
|
|
abra secret_generate db_root_password v1
|
|
|
|
```
|
|
|
|
|
|
|
|
7. `abra deploy`
|
|
|
|
8. Open the configured domain in your browser to finish set-up
|
2020-09-17 21:45:01 +00:00
|
|
|
9. `abra run wordpress chown www-data:www-data /var/www/html/wp-content` to fix
|
|
|
|
file permissions (see #3)
|
2020-09-10 23:30:10 +00:00
|
|
|
|
2020-09-14 16:45:17 +00:00
|
|
|
## Network (Multi-site)
|
|
|
|
|
|
|
|
_(Only tested using subdomains)_
|
|
|
|
|
|
|
|
1. Set up as above
|
|
|
|
2. Uncomment the first `# Multisite` section in `.envrc`
|
|
|
|
3. `direnv allow` (or re-run `source .envrc`)
|
|
|
|
4. `abra deploy`
|
|
|
|
5. Log into the Wordpress admin dashboard, go to Tools » Network Setup
|
|
|
|
6. Don't worry about the suggested file changes
|
|
|
|
7. Comment out the first `# Multisite` section in `.envrc` and uncomment the
|
|
|
|
`# Multisite phase 2` section
|
|
|
|
8. `direnv allow` (or re-run `source .envrc`)
|
|
|
|
9. `abra deploy`
|
|
|
|
10. FIXME setting up SSL / routing
|
|
|
|
|
2020-09-14 17:28:31 +00:00
|
|
|
## Installing a custom theme
|
|
|
|
|
|
|
|
`abra cp ~/path/to/local/theme wordpress:/var/www/html/wp-content/themes/`
|
|
|
|
|
2020-09-10 23:30:10 +00:00
|
|
|
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
|
|
|
[compose-traefik]: https://git.autonomic.zone/compose-stacks/traefik
|
2020-09-21 22:45:45 +00:00
|
|
|
|
|
|
|
## Backups
|
|
|
|
|
|
|
|
1. Edit `.envrc` and uncomment the `export COMPOSE_FILE="compose.yml:compose.backup.yml"` line
|
|
|
|
2. `direnv allow`
|
|
|
|
3. `abra deploy`
|