mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 06:01:04 +01:00
implemented multiple domain string substitution for mybb
This commit is contained in:
parent
3721e9e0ad
commit
f3aa6eba51
@ -1,2 +1,2 @@
|
|||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}funkwhale/"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}funkwhale/"
|
||||||
client_max_body_size: "512M"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: nginx-docker-proxy-domain.yml
|
||||||
vars:
|
vars:
|
||||||
client_max_body_size: "31M"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 31M;"
|
||||||
|
|
||||||
- name: "create {{path_docker_compose_instances}}mailu"
|
- name: "create {{path_docker_compose_instances}}mailu"
|
||||||
file:
|
file:
|
||||||
|
@ -3,21 +3,14 @@
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
- nginx-docker-reverse-proxy
|
- 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
|
## 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
|
### 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.
|
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"
|
- name: "include tasks mybb-proxy-domain.yml"
|
||||||
include_tasks: nginx-docker-proxy-domain.yml
|
include_tasks: mybb-proxy-domain.yml
|
||||||
loop: "{{ domains }}"
|
loop: "{{ domains + [mybb_main_domain] }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
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_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||||
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
|
docker_compose_instance_confd_defaultconf_file: "{{docker_compose_instance_confd_directory}}default.conf"
|
||||||
target_mount_conf_d_directory: "/etc/nginx/conf.d/"
|
target_mount_conf_d_directory: "/etc/nginx/conf.d/"
|
||||||
|
mybb_main_domain: "mybb.{{top_domain}}"
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
docker_compose_instance_directory: "{{path_docker_compose_instances}}pixelfed/"
|
docker_compose_instance_directory: "{{path_docker_compose_instances}}pixelfed/"
|
||||||
client_max_body_size: "512M"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
vars:
|
vars:
|
||||||
client_max_body_size: "{{wordpress_max_upload_size}}"
|
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size {{wordpress_max_upload_size}};"
|
||||||
|
|
||||||
- name: "create {{docker_compose_instance_directory}}"
|
- name: "create {{docker_compose_instance_directory}}"
|
||||||
file:
|
file:
|
||||||
|
@ -2,13 +2,14 @@ server
|
|||||||
{
|
{
|
||||||
server_name {{domain}};
|
server_name {{domain}};
|
||||||
|
|
||||||
|
# Include Matomo Tracking Code
|
||||||
{% if nginx_matomo_tracking_active | default(False) %}
|
{% if nginx_matomo_tracking_active | default(False) %}
|
||||||
{% include 'roles/nginx-matomo-tracking/templates/matomo-tracking.conf.j2' %}
|
{% include 'roles/nginx-matomo-tracking/templates/matomo-tracking.conf.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Additional Domain Specific Configuration
|
||||||
{% if client_max_body_size is defined %}
|
{% if nginx_docker_reverse_proxy_extra_configuration is defined %}
|
||||||
client_max_body_size {{ client_max_body_size }};
|
{{nginx_docker_reverse_proxy_extra_configuration}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
||||||
|
Loading…
Reference in New Issue
Block a user