Skip to content

Docker build for spinning up a WordPress site on a LEMP stack locally with a Lets Encrypt self-signed cert and PHPMyAdmin. Includes MailHog.

License

Notifications You must be signed in to change notification settings

ashstevens-dev/docker-wp-lemp-ssl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-wp-lemp-ssl

Docker build for creating a local WordPress website running on a LEMP stack with SSL from Lets Encrypt. Includes a PHPMyAdmin container so you have a GUI for the database. The nginx.conf includes a variety of directives to enhance the security of the WordPress website. Includes MailHog, a testing SMTP server, so you can test site messaging locally.

Getting Started

docker-compose up -d

Access Site

https://localhost (or at the custom URL that you create using the instructions in the comments near the https-portal container 😉)

Access PHPMyAdmin

http:https://localhost:8081

Preset PHPMyAdmin creds

User: root

Pass: wordpressrootpw

Access the testing mail server inbox

http:https://localhost:8025

Edit the nginx.conf file to whitelist your IP and block others

The IP address you are looking to whitelist comes from the https-portal container.

Find the container's ID by running: docker ps to see the list of running containers.

Then run this, replacing CONTAINER_ID with the ID: docker inspect CONTAINER_ID | grep "IPAddress"

Uncomment lines 76-79 in nginx.conf and replace XXX.XX.X.X with the container IP address.

Run docker-compose up to commit the changes.

About

Docker build for spinning up a WordPress site on a LEMP stack locally with a Lets Encrypt self-signed cert and PHPMyAdmin. Includes MailHog.

Topics

Resources

License

Stars

Watchers

Forks