Run MyBB - Open Source Forum Software - in Docker
i12bretro
learningtechnologybrowser basedbulletin boarddebiandockerdocker containerdocker how todocker made easydocker made simpledocker simplifieddocker tutorialforumhome labhome lab ideashomelabhow toi12bretroinstall guidelinuxmariadbmybbmysqlphpphp based applicationphp based forumrun mybb in dockerself-hostedself-hosted forumtutorialubuntuweb basedweb based tools
#MyBB #Forum #Docker
*** Updated 05/24/2024
Full steps can be found at https://i12bretro.github.io/tutorials/0932.html
What is MyBB?
MyBB is the free and open source forum software powering thousands of engaging, vibrant, and unique communities across the internet. - [https://mybb.com/](https://mybb.com/)## Installing Docker
- Log into the Linux host and run the following commands in a terminal window
# install prerequisites
sudo apt install apt‐transport‐https ca‐certificates curl software‐properties‐common gnupg‐agent ‐y
# add docker gpg key
curl ‐fsSL https://download.docker.com/linux/$(awk ‐F'=' '/^ID=/{ print $NF }' /etc/os‐release)/gpg | sudo apt‐key add ‐
# add docker software repository
sudo add‐apt‐repository "deb [arch=$(dpkg ‐‐print‐architecture)] https://download.docker.com/linux/$(awk ‐F'=' '/^ID=/{ print $NF }' /etc/os‐release) $(lsb_release ‐cs) stable"
# install docker
sudo apt install docker‐ce docker‐compose containerd.io ‐y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod ‐aG docker $USER
# reauthenticate for the new group membership to take effect
su ‐ $USER
Running MyBB Container
- Continue with the following commands in a terminal window
# create working directories
mkdir ~/docker/mybb ‐p && mkdir ~/docker/postgresql ‐p && mkdir ~/docker/nginx ‐p
# set owner of docker directory
sudo chown "$USER":"$USER" ~/docker ‐R
# allow the container to write to working directories
sudo chmod a+rwx ‐R ~/docker/mybb
# download the nginx conf file
wget ‐O ~/docker/nginx/default.conf https://gist.githubusercontent.com/kawaii/ed2fbbf11309b8f635a623fa87abce8d/raw/3a5a6e36b238e55aaef519693ca16c82fbafd2fd/default.conf
# create containers network
docker network create containers
# run the postgesql container
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
# run the mybb container
docker run ‐d ‐‐name mybb ‐v ~/docker/mybb:/var/www/html:rw ‐‐network containers ‐‐restart=unless‐stopped mybb/mybb
# run nginx webserver container
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 ‐‐restart=unless‐stopped nginx
- Open a web browser and navigate to http://DNSorIP:8081
- Click Next at the Welcome screen
- Click Next at the License Agreement
- Click Next at the Requirements Check
- Complete the Database Configuration as shown below
Database Engine: PostgreSQL
Database Server Hostname: postgres
Database Username: mybb_rw
Database Password: My44_rw$
Database Name: mybb
Table Prefix: mybb_
- Click Next after the table creation completes
- Click Next to complete the Table Population
- Click Next at the Theme Insertion screen
- Modify the Board Configuration form as needed > Click Next
- Create an administrator account by entering a Username, Password and Email Address > Click Next
- Click the Admin Control Panel link
- Login with the administrator username and password created earlier
- Welcome to MyBB
Documentation: https://github.com/mybb/docker
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro
...
https://www.youtube.com/watch?v=cBrApDiqw3o
2024-05-24
0.0 LBC
Copyrighted (contact publisher)
30945588 Bytes