Docker Project
Setting up Joomla Web Installer which is an opensource CMS with MySQL as the database. The entire infrastructure is been configured using docker compose for automating the procedures using IAC (Infrastructure as Code).
Joomla is a free and open-source content management system for publishing web content, developed by Open Source Matters, Inc. It is built on a model–view–controller web application framework that can be used independently of the CMS.
Pre-configurations needed:
I am using the RedHat Enterprise Linux 8 as my base OS. Make sure you have already installed both Docker Engine and Docker Compose on your base OS.
Step 1:- Create a directory for the project
# mkdir mycompose # cd mycompose/
Step 2:- Create a new file inside the directory mycompose called docker-compose.yml .
# vim docker-compose.yml
Step 3:- Build and Run using Docker-compose up
# docker-compose up
It will pull the Images for Joomla CMS and MySQL from docker hub, in my case i've already pulled it before. After that it will automatically launch the container for both Joomla and MySQL.
Enter http://IP of the base OS:8081 in a browser to see the application running.
Joomla CMS has started and we can do all the things which the site offers perfectly.
Open a new terminal on your base OS and run docker-compose ps command to check for the images that are running.
# docker-compose up
After using docker compose up now in one click you can stop your whole setup by running the below command.
# docker-compose stop
Again you want to start the service use the below given command.
# docker-compose start
In any case if the site goes down or crashed we can easily relaunch the website within seconds from the exact same point where it was stopped because we've used storage volumes for the services even when the container gets removed the volumes will be there and help us in relaunching the site from the same point where it was stopped.
This is how the basics of docker compose works
Project Link:- https://github.com/satyamkr1402/docker.git