Browse Source

0932: Run MyBB - Open Source Forum Software - in Docker

i12bretro 1 year ago
parent
commit
2995cf9489
1 changed files with 99 additions and 0 deletions
  1. 99 0
      0932.html

+ 99 - 0
0932.html

@@ -0,0 +1,99 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Run MyBB - Open Source Forum Software - in Docker</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Bulletin Board,Debian,Forum,Homelab,Run MyBB In Docker,Linux,MariaDB,MyBB,MySQL,PHP,PHP Based Application,PHP Based Forum,Self-Hosted Forum,Ubuntu,Docker,Docker Container,Docker How To,Docker Made Simple,Docker Simplified,Docker Tutorial,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Run MyBB - Open Source Forum Software - in Docker">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="04/16/2024 08:06:51 PM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Run MyBB - Open Source Forum Software - in Docker</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is MyBB?</h2>
+
+<blockquote>MyBB is the free and open source forum software powering thousands of engaging, vibrant, and unique communities across the internet.<i> - <a href="https://mybb.com/" target="_blank">https://mybb.com/</a></i></blockquote>
+
+<h2>Installing Docker</h2>
+
+<ol>
+	<li>Log into the Linux host and run the following commands in a terminal window
+	<div class="codeBlock"># install prerequisites<br />
+	sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
+	# add docker gpg key<br />
+	curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
+	# add docker software repository<br />
+	sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
+	# install docker<br />
+	sudo apt install docker-ce docker-compose containerd.io -y<br />
+	# enable and start docker service<br />
+	sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
+	# add the current user to the docker group<br />
+	sudo usermod -aG docker $USER<br />
+	# reauthenticate for the new group membership to take effect<br />
+	su - $USER</div>
+	</li>
+</ol>
+
+<h2>Running MyBB Container</h2>
+
+<ol>
+	<li>Continue with the following commands in a terminal window
+	<div class="codeBlock"># create working directories<br />
+	mkdir ~/docker/mybb -p &amp;&amp; mkdir ~/docker/postgresql -p &amp;&amp; mkdir ~/docker/nginx -p<br />
+	# set owner of docker directory<br />
+	sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
+	# allow the container to write to working directories<br />
+	sudo chmod a+rwx -R ~/docker/mybb<br />
+	# download the nginx conf file<br />
+	wget -O ~/docker/nginx/default.conf https://gist.githubusercontent.com/kawaii/ed2fbbf11309b8f635a623fa87abce8d/raw/3a5a6e36b238e55aaef519693ca16c82fbafd2fd/default.conf<br />
+	# create containers network<br />
+	docker network create containers<br />
+	# run the postgesql container<br />
+	docker run -d --name postgres --network containers -p 5432:5432 -e POSTGRES_USER=mybb_rw -e POSTGRES_PASSWORD=My44_rw$ -e POSTGRES_DB=mybb -v ~/docker/postgresql:/var/lib/postgresql/data --restart=unless-stopped postgres:latest<br />
+	# run the mybb container<br />
+	docker run -d --name mybb -v ~/docker/mybb:/var/www/html:rw --network containers --restart=unless-stopped mybb/mybb<br />
+	# run nginx webserver container<br />
+	docker run -d --name nginx --network containers -p 8081:80 -v ~/docker/mybb:/var/www/html:ro -v ~/docker/nginx:/etc/nginx/conf.d:ro nginx</div>
+	</li>
+	<li>Open a web browser and navigate to http://DNSorIP:8081</li>
+	<li>Click Next at the Welcome screen</li>
+	<li>Click Next at the License Agreement</li>
+	<li>Click Next at the Requirements Check</li>
+	<li>Complete the Database Configuration as shown below
+	<p>Database Engine: PostgreSQL<br />
+	<br />
+	Database Server Hostname: postgres<br />
+	Database Username: mybb_rw<br />
+	Database Password: My44_rw$<br />
+	Database Name: mybb<br />
+	<br />
+	Table Prefix: mybb_</p>
+	</li>
+	<li>Click Next after the table creation completes</li>
+	<li>Click Next to complete the Table Population</li>
+	<li>Click Next at the Theme Insertion screen</li>
+	<li>Modify the Board Configuration form as needed &gt; Click Next</li>
+	<li>Create an administrator account by entering a Username, Password and Email Address &gt; Click Next</li>
+	<li>Click the Admin Control Panel link</li>
+	<li>Login with the administrator username and password created earlier</li>
+	<li>Welcome to MyBB</li>
+</ol>
+
+<p>Documentation: <a href="https://github.com/mybb/docker" target="_blank">https://github.com/mybb/docker</a></p>          </div>
+        </div>
+      </body>
+    </html>
+