Git Product home page Git Product logo

woocommerce-dev-docker's Introduction

WooCommerce Development Docker

Overview

This docker-compose environment allows you to run a matrix of PHP, MySQL, WordPress and WooCommerce configurations, for example:

PHP MySQL WordPress WooCommerce Multisite
5.4 5.6 4.7 3.2.6 0
5.5 5.7 4.8 3.3.5 1
5.6 8.0 latest 3.4.4
7.0 nightly latest
7.2 http://beta.url

Requirements

  • Docker >= 1.8.3
  • Docker Compose

See Docker.com for more information. You can install Docker directly from Docker installation page

Getting started

  1. Make a new project folder and clone (or download) the WooCommerce Development Docker repository:
$ mkdir my-plugin && cd my-plugin
$ git clone https://github.com/kilbot/WooCommerce-Dev-Docker.git ./docker
  1. Populate your plugin files, either from an existing project or perhaps using a WordPress Plugin Boilerplate. Copy the .env and fixtures.yml files from the .docker directory.
$ cp .docker/.env.example .env
$ cp .docker/fixtures.example.yml fixtures.yml

At a minimum you should now have a my-plugin folder with the structure below:

my-plugin/
+-- .docker
+-- .env
+-- fixtures.yml
+-- index.php
+-- readme.txt
  1. Start the containers (and watch container logs)
$ docker-compose -f .docker/docker-compose.yml up -d
$ docker-compose -f .docker/docker-compose.yml logs -f --tail=10
  1. Go to http://localhost and log into WordPress with the following credentials:
user: admin
password: password

The first build may take some time to complete, if you can not access http://localhost try again after 5-10 minutes.

Configuration

The .env file contains the default settings for the docker containers.

Dummy data is created using the fixtures.yml template.

Docker management

Start

$ docker-compose -f .docker/docker-compose.yml up -d

Watch container logs

$ docker-compose -f .docker/docker-compose.yml logs -f --tail=10

Shut down

$ docker-compose -f .docker/docker-compose.yml kill

List active containers

$ docker ps

Open container bash

$ docker exec -it <CONTAINER ID or CONTAINER NAME> bash

Purge all docker containers and images

$ docker system purge -fa
or
$ docker system prune -fa

Purge database and wordpress install

$ rm -rf .docker/.db && rm -rf .docker/.html

woocommerce-dev-docker's People

Contributors

kilbot avatar marciol avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.