This repository mainly hosts a sample of .yaml file for running docker-compose with WordPress.
Once docker-compose command line runned, WordPress image will pull its file structure.
Finally, you will be able to start running WordPress and phpmyadmin on localhost.
Project is created with:
- mysql:5.7
- phpmyadmin
- WordPress: latest version
- Run on: Linux ubuntu 20.04
- Clone this repo:
$ git clone https://github.com/artedsolis/worpress-environment-with-docker-compose.git
- go inside the repo with:
$ cd [name_of_the repo]
- type de following command on your terminal:
$ docker-compose up -d
Note:
- this WordPress image uses apache, so that's why volumes are as following volumes: ['./:/var/www/html/']
- the image will link WordPress files into your repo's folder
-
finally go to your: http://localhost:8000 & http://localhost:8080
-
you're donne for installation!
-
to stop docker-compose for runnig type:
$ docker-compose down
then, if you want to unmount your volume:
$ docker-compose down --volume
A way to use a WordPress child theme, once you've runned docker-compose up -d. You have to unzip the parent theme + child theme into wp-content>themes folder (sure you have to deal with some permissions first)