3.9 KiB
Role Name: Docker MyBB
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
- Domain Certificate Retrieval: Automates the process of obtaining SSL certificates for the specified domain using Certbot.
- Nginx Configuration: Handles the configuration of Nginx for the MyBB domain.
- Directory Creation: Ensures the creation of necessary directories including parent directories as required.
- MyBB and Nginx Configuration: Manages the configuration for MyBB and Nginx, including setting up the
default.conf
file. - Docker Compose Setup: Adds and manages the
docker-compose.yml
file necessary for running MyBB with Docker.
Usage
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.
Steps for Manual Installation
-
Prepare Plugin Files:
- Download the desired MyBB plugin zip files.
-
Copy plugin to host:
bash scp <plugin> administrator@<server>:/home/administrator/docker-compose/mybb/plugins
-
Unzip Plugin Files on the Host:
- Unzip the plugin zip files in the host's plugin directory:
unzip /home/administrator/docker-compose/mybb/plugins/<plugin-file>.zip -d /home/administrator/docker-compose/mybb/plugins/
- Replace
<plugin-file>.zip
with the name of the plugin zip file. - Repeat this step for each plugin.
- Unzip the plugin zip files in the host's plugin directory:
-
Access the Docker Container:
- Open a terminal or SSH session on the server where the Docker container is running.
-
Copy Unzipped Plugin Files to the Container:
- Copy the unzipped plugin files from the host directory to the Docker container:
docker compose cp /home/administrator/docker-compose/mybb/plugins/<unzipped-plugin-folder> application:/var/www/html/inc/plugins/
- Replace
<unzipped-plugin-folder>
with the name of the unzipped plugin folder.
- Copy the unzipped plugin files from the host directory to the Docker container:
-
Restart the Container:
- Execute the following command to restart the MyBB container:
docker-compose -p mybb up -d --force-recreate
- This ensures all changes take effect.
- Execute the following command to restart the MyBB container:
-
Activate Plugins in the MyBB Admin Panel:
- Open the MyBB admin panel in your web browser.
- Navigate to the plugin settings and activate the newly installed plugins.
Important Notes
- Ensure you use the correct paths and filenames.
- Do not forget to regularly back up your MyBB database and files before making changes.
- If encountering issues, refer to the MyBB documentation or specific instructions from the plugin author.
Running the Role
Execute the Ansible playbook containing this role to set up MyBB in a Docker environment.
Docker Compose Configuration
The docker-compose.yml.j2
template outlines the services required for MyBB, including the application server, Nginx web server, and database (MariaDB).
Additional Information
- For detailed configuration and customization, refer to the contents of the
default.conf
template and thedocker-compose.yml.j2
template. - Ensure that the environment variables and paths are correctly set as per your system's configuration.
Created with ChatGPT
This README was created with the assistance of ChatGPT, based on a conversation held at this link. ChatGPT provided guidance on structuring this document and outlining the key components of the Docker MyBB role.