mirror of
https://github.com/mother-of-all-self-hosting/mash-playbook
synced 2024-11-10 06:14:17 +00:00
Add Wordpress (#220)
* feat: Add wordpress basics * docs(wordpres): Add draft * fix(wordpress): Database hostname * feat: Add wordpress basics * docs(wordpress): Expand stub to full docu * chore(wordpress): Update role * fix: readd group vars * feat(wordpress): Add basic auth option * Minor adjustments to WordPress documentation * feat: Set default for db Co-authored-by: Slavi Pantaleev <slavi@devture.com> * feat(wordpress): Add defaults as suggested Co-authored-by: Slavi Pantaleev <slavi@devture.com> * feat(wordpress): Use defaults as suggested Co-authored-by: Slavi Pantaleev <slavi@devture.com> * feat(wordpress): Add defaults as suggested Co-authored-by: Slavi Pantaleev <slavi@devture.com> * docs(wordpress): Remove redundant MariaDB mention --------- Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
parent
65e851e51b
commit
38e2f01b68
6 changed files with 125 additions and 0 deletions
|
@ -88,3 +88,4 @@
|
|||
* Wg Easy: 12
|
||||
* Woodpecker Ci Agent: v2.6.0
|
||||
* Woodpecker Ci Server: v2.6.0
|
||||
* Wordpress: 6.5.5
|
||||
|
|
52
docs/services/wordpress.md
Normal file
52
docs/services/wordpress.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Wordpress
|
||||
|
||||
[WordPress](https://wordpress.org/) is a widley used open source web content management system that this playbook can install, powered by the [mother-of-all-self-hosting/ansible-role-wordpress](https://github.com/mother-of-all-self-hosting/ansible-role-wordpress) Ansible role.
|
||||
|
||||
## Dependencies
|
||||
|
||||
This service requires the following other services:
|
||||
|
||||
- a [MariaDB](mariadb.md) database
|
||||
- a [Traefik](traefik.md) reverse-proxy server
|
||||
|
||||
## Configuration
|
||||
|
||||
```yaml
|
||||
########################################################################
|
||||
# #
|
||||
# wordpress #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
wordpress_enabled: true
|
||||
|
||||
wordpress_hostname: example.org
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /wordpress #
|
||||
# #
|
||||
########################################################################
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Navigate to the domain you set as `wordpress_hostname`, select a language and create an admin user.
|
||||
|
||||
> **Make sure to create a user with a strong password**
|
||||
|
||||
You can now log in and fill your website with content!
|
||||
|
||||
|
||||
## Advanced
|
||||
|
||||
### Basic authentication
|
||||
|
||||
If you don't want to have your website accessible to everyone (e.g. you first want to present it to a client) you can use
|
||||
|
||||
```yaml
|
||||
wordpress_container_labels_middleware_basic_auth_enabled: true
|
||||
# Use `htpasswd -nb USERNAME PASSSWORD` to generate the users below.
|
||||
# See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
|
||||
wordpress_container_labels_middleware_basic_auth_users: ''
|
||||
```
|
|
@ -86,6 +86,7 @@
|
|||
| [WireGuard Easy](https://github.com/wg-easy/wg-easy) | The easiest way to run [WireGuard](https://www.wireguard.com/) VPN + Web-based Admin UI. | [Link](services/wg-easy.md) |
|
||||
| [Forgejo](https://forgejo.org/) | An alternative fork of Gitea. Easy and painless self-hosted git server. | [Link](services/forgejo.md) |
|
||||
| [Woodpecker CI](https://woodpecker-ci.org/) | A simple Continuous Integration (CI) engine with great extensibility. | [Link](services/woodpecker-ci.md) |
|
||||
| [WordPress](https://wordpress.org/) | A widley used open source web content management system | [Link](services/wordpress.md) |
|
||||
| System-related | A collection of various system-related components | [Link](services/system.md) |
|
||||
|
||||
|
||||
|
|
|
@ -619,6 +619,11 @@ mash_playbook_devture_systemd_service_manager_services_list_auto_itemized:
|
|||
{{ ({'name': (wg_easy_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'wg-easy']} if wg_easy_enabled else omit) }}
|
||||
# /role-specific:wg_easy
|
||||
|
||||
# role-specific:wordpress
|
||||
- |-
|
||||
{{ ({'name': (wordpress_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'wordpress']} if wordpress_enabled else omit) }}
|
||||
# /role-specific:wordpress
|
||||
|
||||
# role-specific:forgejo
|
||||
- |-
|
||||
{{ ({'name': (forgejo_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'forgejo', 'forgejo-server']} if forgejo_enabled else omit) }}
|
||||
|
@ -3969,6 +3974,17 @@ mash_playbook_mariadb_managed_databases_auto_itemized:
|
|||
}}
|
||||
# /role-specific:authelia
|
||||
|
||||
# role-specific:wordpress
|
||||
- |-
|
||||
{{
|
||||
({
|
||||
'name': wordpress_database_name,
|
||||
'username': wordpress_database_username,
|
||||
'password': wordpress_database_password,
|
||||
} if wordpress_enabled and wordpress_database_hostname == mariadb_identifier | default('mash-mariadb') else omit)
|
||||
}}
|
||||
# /role-specific:wordpress
|
||||
|
||||
mariadb_managed_databases_auto: "{{ mash_playbook_mariadb_managed_databases_auto_itemized | reject('equalto', omit) }}"
|
||||
|
||||
########################################################################
|
||||
|
@ -5423,3 +5439,50 @@ devture_woodpecker_ci_agent_config_agent_secret: "{{ devture_woodpecker_ci_serve
|
|||
# #
|
||||
########################################################################
|
||||
# /role-specific:woodpecker_ci_agent
|
||||
|
||||
|
||||
# role-specific:wordpress
|
||||
########################################################################
|
||||
# #
|
||||
# wordpress #
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
wordpress_enabled: false
|
||||
|
||||
wordpress_identifier: "{{ mash_playbook_service_identifier_prefix }}wordpress"
|
||||
|
||||
wordpress_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}wordpress"
|
||||
|
||||
wordpress_uid: "{{ mash_playbook_uid }}"
|
||||
wordpress_gid: "{{ mash_playbook_gid }}"
|
||||
|
||||
wordpress_systemd_required_systemd_services_list_auto: |
|
||||
{{
|
||||
([(mariadb_identifier | default('mash-mariadb')) ~ '.service'] if mariadb_enabled | default(false) and wordpress_database_hostname == mariadb_identifier | default('mash-mariadb') else [])
|
||||
}}
|
||||
|
||||
|
||||
wordpress_container_additional_networks_auto: |
|
||||
{{
|
||||
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
|
||||
+
|
||||
([mariadb_identifier | default('mash-mariadb')] if mariadb_enabled | default(false) and wordpress_database_hostname == mariadb_identifier | default('mash-mariadb') and wordpress_container_network != mariadb_identifier | default('mash-mariadb') else [])
|
||||
}}
|
||||
|
||||
wordpress_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
|
||||
wordpress_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
|
||||
wordpress_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
|
||||
wordpress_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
|
||||
|
||||
|
||||
wordpress_database_hostname: "{{ mariadb_identifier if mariadb_enabled | default(false) else '' }}"
|
||||
wordpress_mysql_port: "{{ '3306' if mariadb_enabled | default(false) else '' }}"
|
||||
wordpress_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.mariadb', rounds=655555) | to_uuid }}"
|
||||
|
||||
########################################################################
|
||||
# #
|
||||
# /wordpress #
|
||||
# #
|
||||
########################################################################
|
||||
# /role-specific:wordpress
|
||||
|
|
|
@ -391,3 +391,7 @@
|
|||
version: v2.6.0-0
|
||||
name: woodpecker_ci_server
|
||||
activation_prefix: devture_woodpecker_ci_server_
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-wordpress
|
||||
version: v6.5.5-0
|
||||
name: wordpress
|
||||
activation_prefix: wordpress_
|
||||
|
|
|
@ -407,6 +407,10 @@
|
|||
- role: galaxy/woodpecker_ci_agent
|
||||
# /role-specific:woodpecker_ci_agent
|
||||
|
||||
# role-specific:wordpress
|
||||
- role: galaxy/wordpress
|
||||
# /role-specific:wordpress
|
||||
|
||||
# role-specific:roundcube
|
||||
- role: galaxy/roundcube
|
||||
# /role-specific:roundcube
|
||||
|
|
Loading…
Reference in a new issue