Skip to content

Commit

Permalink
Add docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitbohra committed Aug 24, 2018
1 parent 34eb413 commit edbfa21
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Expand Up @@ -7,8 +7,36 @@ with plugins which create blocks.
See also:
[Gutenberg developer documentation](https://wordpress.org/gutenberg/handbook/)

## Build `esnext` Examples

For each of the examples that include an `esnext` example the following commands are required to build the plugins:

- `npm install` to install the node packages
- `npm run build` to build the production version of the plugin or `npm run dev` to build a development version of the plugin and watch changes for automatic rebuild

## Local Environment

First, you need a WordPress Environment to run the plugin on. The quickest way to get up and running is to use the provided docker setup. Install [docker-ce](https://store.docker.com/search?type=edition&offering=community) and [docker-compose](https://docs.docker.com/compose/install/) by following the most recent instructions on the docker site.

In the folder of your preference, clone this project and enter the working directory:

```
git clone git@github.com:WordPress/gutenberg-examples.git
cd gutenberg-examples
```

To bring up this local WordPress instance run:

```
docker-compose up -d
```

The WordPress should be available at http://localhost:9999

To stop this local WordPress instance later run:

```
docker-compose stop
```


17 changes: 17 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,17 @@
version: '3.1'

services:

wordpress:
image: wordpress
ports:
- 9999:80
environment:
WORDPRESS_DB_PASSWORD: example
volumes:
- ./:/var/www/html/wp-content/plugins/gutenberg-example

mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: example

0 comments on commit edbfa21

Please sign in to comment.