mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
implemented multiple domain string substitution for mybb
This commit is contained in:
@@ -3,21 +3,14 @@
|
||||
## Dependencies
|
||||
- nginx-docker-reverse-proxy
|
||||
|
||||
## Variables
|
||||
- `docker_compose_instance_directory`: The directory where Docker Compose files for MyBB are stored.
|
||||
- `target_mount_conf_d_directory`: Directory for Docker Nginx configuration.
|
||||
- `default_conf_docker_file`: The default Nginx configuration file for the server.
|
||||
- `docker_compose_instance_confd_directory`: The Nginx server's configuration directory.
|
||||
|
||||
## Tasks
|
||||
1. **Domain Certificate Retrieval:** Automates the process of obtaining SSL certificates for the specified domain using Certbot.
|
||||
2. **Nginx Configuration:** Handles the configuration of Nginx for the MyBB domain.
|
||||
3. **Directory Creation:** Ensures the creation of necessary directories including parent directories as required.
|
||||
4. **MyBB and Nginx Configuration:** Manages the configuration for MyBB and Nginx, including setting up the `default.conf` file.
|
||||
5. **Docker Compose Setup:** Adds and manages the `docker-compose.yml` file necessary for running MyBB with Docker.
|
||||
|
||||
## Usage
|
||||
|
||||
### Multi Domain Installation
|
||||
If you want to access your mybb over multiple domains, keep the following in mind:
|
||||
- Set Cookie Domain to nothing
|
||||
- Access mybb for installation via mybb.<top_domain>
|
||||
- Set the Board Url to mybb.<top_domain>
|
||||
|
||||
### Manual Installation of MyBB Plugins
|
||||
|
||||
This guide describes the process of manually installing MyBB plugins in your Docker-MyBB environment. This can be useful if you want to quickly test plugins or do not wish to execute the Ansible role.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
loop: "{{ domains }}"
|
||||
- name: "include tasks mybb-proxy-domain.yml"
|
||||
include_tasks: mybb-proxy-domain.yml
|
||||
loop: "{{ domains + [mybb_main_domain] }}"
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
|
7
roles/docker-mybb/tasks/mybb-proxy-domain.yml
Normal file
7
roles/docker-mybb/tasks/mybb-proxy-domain.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: "include task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
|
||||
- name: "include task create-domain-conf.yml"
|
||||
include_tasks: create-domain-conf.yml
|
||||
vars:
|
||||
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{mybb_main_domain}}' '{{domain}}';"
|
@@ -3,3 +3,4 @@ docker_compose_instance_directory: "{{path_docker_compose_instances}}mybb/"
|
||||
docker_compose_instance_confd_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
|
||||
target_mount_conf_d_directory: "/etc/nginx/conf.d/"
|
||||
mybb_main_domain: "mybb.{{top_domain}}"
|
||||
|
Reference in New Issue
Block a user