Setup Docker PHP-FPM Nginx MySQL WordPress
How to setup Docker with Nginx, PHP-FPM, MySQL and WordPress.
I was attempting to fix Nginx, MySQL, PHP-FPM and WordPress locally on my Mac with brew and decided the whole thing would be easier just to run in docker.
I have split each service into its own container to keep in line with the docker way.
See my Github page for more instructions but its pretty straight forward (Be sure you have installed docker toolbox or docker):
Clone repo:
1 |
git clone git@github.com:jharrington22/nginx-php-wordpress-mysql-docker.git |
1 |
cd nginx-php-wordpress-mysql-docker |
Set ENV for WordPress core files location:
1 |
export WORDPRESS_DIR=<Wordpress directory> |
Build images:
1 |
docker-compose build |
Run the environment:
1 |
docker-compose up |
Once this is done browse to http://dockerhost (mac) or http://localhost if you are on linux and you should your WordPress site!
https://github.com/jharrington22/nginx-php-wordpress-mysql-docker