Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This project sets up a WordPress site using a complete LEMP stack (Linux, Nginx, MySQL, PHP) inside Docker containers via docker-compose. It includes a bash script that automates the setup process—checking dependencies, pulling the latest WordPress version, generating /etc/hosts entries, and managing the lifecycle of the site (start, stop, delete).

Notifications You must be signed in to change notification settings

neha-dev-dot/LEMP-stack-docker-compose

Repository files navigation

LEMP-stack-docker-compose

WordPress site using the latest WordPress Version. This will be a LEMP (Linux, Nginx, Mysql, PHP) stack running inside Docker containers. Created a Bash shell script to run the LEMP stack with just one command, and your WordPress site will start running on a local machine or browser. This bash script will contain the following features-

  1. Check if docker and docker-compose is installed on the system. If not present, install the missing packages.
  2. The script should be able to create a WordPress site using the latest WordPress Version. Provided a way for the user to provide the site name as a command-line argument.
  3. It must be a LEMP stack running inside containers (Docker) and a docker-compose file is a must.
  4. Created a /etc/hosts entry for example.com pointing to localhost. Here we are assuming the user has provided example.com as the site name.
  5. Prompt the user to open example.com in a browser if all goes well and the site is up and healthy.
  6. Added another subcommand to enable/disable the site (stopping/starting the containers)
  7. Added one more subcommand to delete the site (deleting containers and local files).

Command for run bash script:

chmod +wx <file_name.sh>

./<file_name.sh> <sitename.com>

Here is some snapshots as a result:





About

This project sets up a WordPress site using a complete LEMP stack (Linux, Nginx, MySQL, PHP) inside Docker containers via docker-compose. It includes a bash script that automates the setup process—checking dependencies, pulling the latest WordPress version, generating /etc/hosts entries, and managing the lifecycle of the site (start, stop, delete).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /