Skip to content

Commit

Permalink
Update dev environment (#65)
Browse files Browse the repository at this point in the history
* Ability to run the dev environment as a docker stack.

* Updating Readme to add  dev instructions.
  • Loading branch information
afoucret authored Sep 14, 2021
1 parent 33355c2 commit 4c41e78
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 39 deletions.
39 changes: 0 additions & 39 deletions Dockerfile

This file was deleted.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,31 @@ You can checkout the [Site Search Plugin discuss forum](https://wordpress.org/su

You can contact our support by sending an email to [email protected].

### How to start the development environment

#### Create the Docker stack

You can create a docker stack using:

```bash
docker stack deploy -c stack.yml wordpress-dev
```

Alternatively, you can use docker-compose instead of stack:

```bash
docker-compose -f stack.yml up
```

Your wordpress dev instance will boot up and be available at http://localhost:8080.

To enter the wordpress container, you can use the followin command:

```bash
docker exec -it $(docker ps -a -f label=com.docker.stack.namespace=wordpress-dev -f expose=80/tcp --format "{{.ID}}") /bin/bash
```


## Contribute 🚀

We welcome contributors to the project. Before you begin, a couple notes...
Expand Down
32 changes: 32 additions & 0 deletions stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3.1'

services:

wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wpuser
WORDPRESS_DB_PASSWORD: wppass
WORDPRESS_DB_NAME: wpdb
volumes:
- wordpress:/var/www/html
- '.:/var/www/html/wp-content/plugins/swiftype-search'

db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: wpdb
MYSQL_USER: wpuser
MYSQL_PASSWORD: wppass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
volumes:
- db:/var/lib/mysql

volumes:
wordpress:
db:

0 comments on commit 4c41e78

Please sign in to comment.