mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Updated mybb README.md, renamed variables, solved mybb bug
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
|
||||
## Variables
|
||||
- `docker_compose_instance_directory`: The directory where Docker Compose files for MyBB are stored.
|
||||
- `conf_d_docker_directory`: Directory for Docker Nginx configuration.
|
||||
- `default_conf_server_file`: The default Nginx configuration file for the server.
|
||||
- `conf_d_server_directory`: The Nginx server's configuration directory.
|
||||
- `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.
|
||||
@@ -18,11 +18,53 @@
|
||||
|
||||
## Usage
|
||||
|
||||
### Install Plugins
|
||||
To install MyBB plugins, extract them to a mounted volume and sync using the provided `docker run` command
|
||||
```bash
|
||||
docker run --rm -v mybb-data:/target/ -v /mnt/:/origin/ "kevinveenbirkenbach/alpine-rsync" sh -c "rsync -avv /origin/inc/plugins/ /target/"
|
||||
```
|
||||
### 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
|
||||
|
||||
|
||||
1. **Prepare Plugin Files:**
|
||||
- Download the desired MyBB plugin zip files.
|
||||
|
||||
2. **Copy plugin to host:**
|
||||
- ```bash scp <plugin> administrator@<server>:/home/administrator/docker-compose/mybb/plugins```
|
||||
|
||||
3. **Unzip Plugin Files on the Host:**
|
||||
- Unzip the plugin zip files in the host's plugin directory:
|
||||
```bash
|
||||
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.
|
||||
|
||||
4. **Access the Docker Container:**
|
||||
- Open a terminal or SSH session on the server where the Docker container is running.
|
||||
|
||||
5. **Copy Unzipped Plugin Files to the Container:**
|
||||
- Copy the unzipped plugin files from the host directory to the Docker container:
|
||||
```bash
|
||||
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.
|
||||
|
||||
6. **Restart the Container:**
|
||||
- Execute the following command to restart the MyBB container:
|
||||
```bash
|
||||
docker-compose -p mybb up -d --force-recreate
|
||||
```
|
||||
- This ensures all changes take effect.
|
||||
|
||||
7. **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.
|
||||
|
@@ -5,17 +5,17 @@
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
- name: "create {{conf_d_server_directory}} and parent directories"
|
||||
- name: "create {{docker_compose_instance_confd_directory}} and parent directories"
|
||||
file:
|
||||
path: "{{conf_d_server_directory}}"
|
||||
path: "{{docker_compose_instance_confd_directory}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
recurse: yes
|
||||
|
||||
- name: "create {{default_conf_server_file}}"
|
||||
- name: "create {{docker_compose_instance_confd_defaultconf_file}}"
|
||||
template:
|
||||
src: "default.conf"
|
||||
dest: "{{default_conf_server_file}}"
|
||||
dest: "{{docker_compose_instance_confd_defaultconf_file}}"
|
||||
notify: recreate mybb
|
||||
|
||||
- name: add docker-compose.yml
|
||||
|
@@ -7,7 +7,6 @@ server {
|
||||
error_log stderr debug;
|
||||
root /var/www/html;
|
||||
index index.html index.php;
|
||||
worker_processes auto;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
@@ -30,13 +29,6 @@ server {
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
|
||||
# client timeout
|
||||
keepalive_timeout 60s;
|
||||
client_header_timeout 60s;
|
||||
client_body_timeout 60s;
|
||||
send_timeout 300s;
|
||||
reset_timedout_connection on;
|
||||
|
||||
# proxy timeouts
|
||||
proxy_connect_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
|
@@ -23,7 +23,7 @@ services:
|
||||
ports:
|
||||
- "127.0.0.1:{{http_port}}:80"
|
||||
volumes:
|
||||
- "{{conf_d_server_directory}}:{{conf_d_docker_directory}}:ro"
|
||||
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
|
||||
- "data:/var/www/html:ro"
|
||||
database:
|
||||
logging:
|
||||
@@ -36,7 +36,7 @@ services:
|
||||
POSTGRES_USER: mybb
|
||||
image: postgres:14-alpine
|
||||
volumes:
|
||||
- ${PWD}/postgres/data:/var/lib/postgresql/data:rw
|
||||
- database:/var/lib/postgresql/data:rw
|
||||
restart: always
|
||||
volumes:
|
||||
database:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
docker_compose_instance_directory: "{{path_docker_compose_files}}mybb/"
|
||||
conf_d_server_directory: "{{docker_compose_instance_directory}}conf.d/"
|
||||
default_conf_server_file: "{{conf_d_docker_directory}}default.conf"
|
||||
conf_d_docker_directory: "/etc/nginx/conf.d/"
|
||||
docker_compose_instance_directory: "{{docker_compose_instances_directory}}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/"
|
||||
|
Reference in New Issue
Block a user