A WordPress environment

with docker-compose

Table of contents

General info

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.

Technologies

Project is created with:

  • mysql:5.7
  • phpmyadmin
  • WordPress: latest version
  • Run on: Linux ubuntu 20.04

Setup

  1. Clone this repo:

$ git clone https://github.com/artedsolis/worpress-environment-with-docker-compose.git

  1. go inside the repo with:

$ cd [name_of_the repo]

  1. 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
  1. finally go to your: http://localhost:8000 & http://localhost:8080

  2. you're donne for installation!

  3. to stop docker-compose for runnig type:

$ docker-compose down

then, if you want to unmount your volume:

$ docker-compose down --volume

Child Theme

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)

Resources