Skip to content

Commit

Permalink
Release 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Jul 3, 2017
1 parent 9ff9ab3 commit 118e43c
Show file tree
Hide file tree
Showing 17 changed files with 239 additions and 75 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Docker4WordPress Changelog

## 2.2.0

* New [Apache 2.4 container](http://docs.docker4wordpress.org/en/latest/containers/apache)
* New [AthenaPDF container](http://docs.docker4wordpress.org/en/latest/containers/athenapdf), drop-in replacement for wkhtmltopdf
* WordPress: updated Vanilla WordPress 4.8
* PHP: updated PHP 7: 7.0.20, 7.1.6
* PHP: images rebased to Alpine Linux 3.6 and now use LibreSSL instead of OpenSSL
* PHP: extension are now frozen, see https://github.com/wodby/php
* PHP: runtime libraries are now frozen
* PHP: mongoDB extension downgraded to 1.1.10
* PHP: expose header now disabled by default
* PHP: dropped few environment variables
* PHP: APCu extension is now configurable
* Nginx: new version 1.13, 1.12
* Nginx: 1.10 dropped
* Nginx: you can now override include of wordpress.conf file
* MariaDB: revamped optimized configuration
* Bug fix: resolved imagick segfault caused by a bug in ImageMagick library
* Bug fix: some environment variables missed in SSH container
* [New way](http://docs.docker4wordpress.org/en/latest/macos) to improve volumes performance on macOS] via user-guided caching

## 2.1.0

* New 2.1.0 images for php, nginx, mariadb, redis and varnish
Expand Down
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Docker-based WordPress stack
# Docker-based WordPress Stack

[![Documentation Status](https://readthedocs.org/projects/docker4wordpress/badge/?version=latest)](http://docs.docker4wordpress.org)
[![Build Status](https://travis-ci.org/wodby/docker4wordpress.svg?branch=master)](https://travis-ci.org/wodby/docker4wordpress)
Expand All @@ -14,28 +14,34 @@ Read [**Getting Started**](http://docs.docker4wordpress.org/en/latest/).
## Stack

[wodby/wordpress-nginx]: https://github.com/wodby/wordpress-nginx
[wodby/wordpress-apache]: https://github.com/wodby/wordpress-apache
[wodby/wordpress]: https://github.com/wodby/wordpress
[wodby/wordpress-php]: https://github.com/wodby/wordpress-php
[wodby/mariadb]: https://github.com/wodby/mariadb
[wodby/redis]: https://github.com/wodby/redis
[wodby/wordpress-varnish]: https://github.com/wodby/wordpress-varnish
[phpmyadmin/phpmyadmin]: https://hub.docker.com/r/phpmyadmin/phpmyadmin
[mailhog/mailhog]: https://hub.docker.com/r/mailhog/mailhog
[athenapdf-service]: https://hub.docker.com/r/arachnysdocker/athenapdf-service
[phpmyadmin]: https://hub.docker.com/r/phpmyadmin/phpmyadmin
[mailhog]: https://hub.docker.com/r/mailhog/mailhog
[portainer]: https://hub.docker.com/r/portainer/portainer
[_/traefik]: https://hub.docker.com/_/traefik

The WordPress stack consist of the following containers:

| Container | Versions | Service name | Image | Enabled by default |
| --------- | -------- | ------------ | ----- | ------------------ |
| Nginx | 1.10 | nginx | [wodby/wordpress-nginx] ||
| WordPress | 4 | php | [wodby/wordpress] ||
| PHP | 7.0, 7.1 | php | [wodby/wordpress-php] | |
| MariaDB | 10.1 | mariadb | [wodby/mariadb] ||
| Redis | 3.2 | redis | [wodby/redis] | |
| Varnish | 4.1 | varnish | [wodby/wordpress-varnish] | |
| phpMyAdmin | latest | pma | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog/mailhog] ||
| Traefik | latest | traefik | [_/traefik] ||
| Nginx | 1.13, 1.12 | nginx | [wodby/wordpress-nginx] ||
| Apache | 2.4 | php | [wodby/wordpress-apache] | |
| WordPress | 4 | php | [wodby/wordpress] ||
| PHP | 7.1, 7.0 | php | [wodby/wordpress-php] | |
| MariaDB | 10.1 | mariadb | [wodby/mariadb] ||
| Redis | 3.2 | redis | [wodby/redis] | |
| Varnish | 4.1 | varnish | [wodby/wordpress-varnish] | |
| AthenaPDF | latest | athenapdf | [athenapdf-service] | |
| phpMyAdmin | latest | pma | [phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog] ||
| Portainer | latest | portainer | [portainer] ||
| Traefik | latest | traefik | [_/traefik] ||

Supported WordPress versions: 4

Expand Down
79 changes: 61 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"

services:
mariadb:
image: wodby/mariadb:10.1-2.1.0
image: wodby/mariadb:10.1-2.3.3
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
Expand All @@ -13,10 +13,10 @@ services:
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.

php:
image: wodby/wordpress:4-7.1-2.1.0
# image: wodby/wordpress:4-7.0-2.1.0
# image: wodby/wordpress-php:7.0-2.1.0
# image: wodby/wordpress-php:7.1-2.1.0
image: wodby/wordpress:4-7.1-2.2.0
# image: wodby/wordpress:4-7.0-2.2.0
# image: wodby/wordpress-php:7.0-2.2.0
# image: wodby/wordpress-php:7.1-2.2.0
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
# PHP_XDEBUG: 1
Expand All @@ -25,27 +25,50 @@ services:
# PHP_XDEBUG_REMOTE_HOST: "10.254.254.254" # You will also need to 'sudo ifconfig lo0 alias 10.254.254.254'
volumes:
- codebase:/var/www/html
# - docker-sync:/var/www/html # Docker-sync for macOS users
# Options for macOS users (http://docs.docker4wordpress.org/en/latest/macos)
# - codebase:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync

nginx:
image: wodby/wordpress-nginx:4-1.10-2.1.0
# nginx:
# image: wodby/wordpress-nginx:4-1.13-2.2.0
## image: wodby/wordpress-nginx:4-1.12-2.2.0
# environment:
# NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
# NGINX_ERROR_LOG_LEVEL: debug
# NGINX_BACKEND_HOST: php
# NGINX_SERVER_ROOT: /var/www/html
# volumes:
# - codebase:/var/www/html
## Options for macOS users (http://docs.docker4wordpress.org/en/latest/macos)
## - codebase:/var/www/html:cached # User-guided caching
## - docker-sync:/var/www/html # Docker-sync
# depends_on:
# - php
# labels:
# - 'traefik.backend=nginx'
# - 'traefik.port=80'
# - 'traefik.frontend.rule=Host:wp.docker.localhost'

apache:
image: wodby/wordpress-apache:2.4-1.0.0
depends_on:
- php
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/
APACHE_LOG_LEVEL: debug
APACHE_BACKEND_HOST: php
APACHE_SERVER_ROOT: /var/www/html
volumes:
- codebase:/var/www/html
# - docker-sync:/var/www/html # Docker-sync for macOS users
depends_on:
- php
# Options for macOS users (http://docs.docker4wordpress.org/en/latest/macos)
# - codebase:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- 'traefik.backend=nginx'
- 'traefik.backend=apache'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:wp.docker.localhost'

# varnish:
# image: wodby/wordpress-varnish:4.1-2.1.0
# image: wodby/wordpress-varnish:4.1-2.2.0
# depends_on:
# - nginx
# environment:
Expand All @@ -58,7 +81,7 @@ services:
# - 'traefik.frontend.rule=Host:varnish.wp.docker.localhost'

# redis:
# image: wodby/redis:3.2-2.1.0
# image: wodby/redis:3.2-2.1.1

# pma:
# image: phpmyadmin/phpmyadmin
Expand All @@ -73,13 +96,33 @@ services:
# - 'traefik.port=80'
# - 'traefik.frontend.rule=Host:pma.wp.docker.localhost'

# athenapdf:
# image: arachnysdocker/athenapdf-service
# environment:
# WEAVER_AUTH_KEY: weaver-auth-key
# WEAVER_ATHENA_CMD: "athenapdf -S"
# WEAVER_MAX_WORKERS: 10
# WEAVER_MAX_CONVERSION_QUEUE: 50
# WEAVER_WORKER_TIMEOUT: 90
# WEAVER_CONVERSION_FALLBACK: false

mailhog:
image: mailhog/mailhog
labels:
- 'traefik.backend=mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.wp.docker.localhost'

portainer:
image: portainer/portainer
command: --no-auth
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.backend=portainer'
- 'traefik.port=9000'
- 'traefik.frontend.rule=Host:portainer.wp.docker.localhost'

traefik:
image: traefik
command: -c /dev/null --web --docker --logLevel=INFO
Expand Down
7 changes: 7 additions & 0 deletions docs/containers/apache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Apache container

To set apache as a default container uncomment apache service definition and comment nginx service definition.

## Configuration

Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/wordpress-apache).
13 changes: 13 additions & 0 deletions docs/containers/athenapdf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AthenaPDF container

AthenaPDF is a drop-in replacement for wkhtmltopdf

Usage:

```bash
$ curl http://athenapdf:8080/convert\?auth\=wodby-athenapdf\&url\=http://google.com/ |> out.pdf
```

## Configuration

Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/arachnys/athenapdf/blob/master/weaver/conf/sample.env).
4 changes: 2 additions & 2 deletions docs/containers/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Exporting a specific database:
docker-compose exec mariadb sh -c 'exec mysqldump -uroot -p"root-password" my-db' > my-db.sql
```

## Customization
## Configuration

See the list of environment variables available for customization at [wodby/mariadb](https://github.com/wodby/mariadb).
Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/mariadb).
7 changes: 5 additions & 2 deletions docs/containers/nginx.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Nginx container

Nginx is being used as a web server.
Nginx is being used as a default http server.

See the list of environment variables available for customization at [wodby/wordpress-nginx](https://github.com/wodby/wordpress-nginx).
## Configuration

Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/wordpress-nginx).

7 changes: 4 additions & 3 deletions docs/containers/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you would like to autostart xdebug, uncomment this line:
PHP_XDEBUG_REMOTE_AUTOSTART: 1 # Comment out to disable (default).
```
### Xdebug on Mac OS X
### Xdebug on macOS
There are two more things that need to be done on macOS in order to have Xdebug working (because there's no docker0 interface). Enable Xdebug as described in the previous section and uncomment the following two lines:
Expand All @@ -43,6 +43,7 @@ You also need to have loopback alias with IP from above. You need this only once
```bash
sudo ifconfig lo0 alias 10.254.254.254
```

### Xdebug on Windows

You should do same things as for Mac OS. Enable Xdebug as described in the previous 2 sections and replace value of _PHP_XDEBUG_REMOTE_HOST_ to your DockerNAT ip assigned (by default it should be 10.0.75.1):
Expand All @@ -53,6 +54,6 @@ PHP_XDEBUG_REMOTE_HOST: "10.0.75.1" # Setting the host (localhost by default)
You also need to check firewall not to block your connection. Disabling firewall should help.
## Customization
## Configuration
See the list of environment variables available for customization at [wodby/wordpress-php](https://github.com/wodby/wordpress-php).
Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/wordpress-php).
4 changes: 2 additions & 2 deletions docs/containers/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ define('WP_REDIS_HOST', 'redis');
define('WP_REDIS_PORT', '6379');
```

## Customization
## Configuration

You can find more information about redis configuration on [wodby/redis](https://github.com/wodby/redis).
Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/redis).
4 changes: 2 additions & 2 deletions docs/containers/varnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

TBD

See https://docs.wodby.com/bundles/containers/varnish.html
## Configuration

You can find more information about Varnish configuration and actions on [wodby/wordpress-varnish](https://github.com/wodby/wordpress-varnish).
Configuration is possible via environment variables. See the full list of variables on [GitHub](https://github.com/wodby/wordpress-varnish).
15 changes: 9 additions & 6 deletions docs/domains.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ Docker4WordPress uses [traefik](https://hub.docker.com/_/traefik/) container for

Default domains:

| Service | Domain |
| ------- | ------ |
| nginx | [http://wp.docker.localhost:8000](http://wp.docker.localhost:8000) |
| pma | [http://pma.wp.docker.localhost:8000](http://pma.wp.docker.localhost:8000) |
| mailhog | [http://mailhog.wp.docker.localhost:8000](http://mailhog.wp.docker.localhost:8000) |
| varnish | [http://varnish.wp.docker.localhost:8000](http://varnish.wp.docker.localhost:8000) |
| Service | Domain |
| ------- | ------ |
| nginx/apache | [http://wp.docker.localhost:8000](http://wp.docker.localhost:8000) |
| pma | [http://pma.wp.docker.localhost:8000](http://pma.wp.docker.localhost:8000) |
| mailhog | [http://mailhog.wp.docker.localhost:8000](http://mailhog.wp.docker.localhost:8000) |
| varnish | [http://varnish.wp.docker.localhost:8000](http://varnish.wp.docker.localhost:8000) |
| portainer | [http://portainer.wp.docker.localhost:8000](http://portainer.wp.docker.localhost:8000) |

You can customize domains under labels definition, e.g. `traefik.frontend.rule=Host:mailhog.wp.docker.localhost`. Note: if domains end with `docker.localhost` you don't need to add records to /etc/hosts file

> IMPORTANT: you might need to add *.docker.localhost domains manually to your /etc/hosts file
32 changes: 20 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,32 @@ Docker4WordPress is designed to be used for local development, if you're looking
The WordPress stack consist of the following containers:

[wodby/wordpress-nginx]: https://github.com/wodby/wordpress-nginx
[wodby/wordpress-apache]: https://github.com/wodby/wordpress-apache
[wodby/wordpress]: https://github.com/wodby/wordpress
[wodby/wordpress-php]: https://github.com/wodby/wordpress-php
[wodby/mariadb]: https://github.com/wodby/mariadb
[wodby/redis]: https://github.com/wodby/redis
[wodby/wordpress-varnish]: https://github.com/wodby/wordpress-varnish
[phpmyadmin/phpmyadmin]: https://hub.docker.com/r/phpmyadmin/phpmyadmin
[mailhog/mailhog]: https://hub.docker.com/r/mailhog/mailhog
[athenapdf-service]: https://hub.docker.com/r/arachnysdocker/athenapdf-service
[phpmyadmin]: https://hub.docker.com/r/phpmyadmin/phpmyadmin
[mailhog]: https://hub.docker.com/r/mailhog/mailhog
[portainer]: https://hub.docker.com/r/portainer/portainer
[_/traefik]: https://hub.docker.com/_/traefik

| Container | Versions | Service name | Image | Enabled by default |
| --------- | -------- | ------------ | ----- | ------------------ |
| [Nginx](containers/nginx.md) | 1.10 | nginx | [wodby/wordpress-nginx] ||
| WordPress | 4 | php | [wodby/wordpress] ||
| [PHP](containers/php.md) | 7.0, 7.1 | php | [wodby/wordpress-php] | |
| [MariaDB](containers/mariadb.md) | 10.1 | mariadb | [wodby/mariadb] ||
| [Redis](containers/redis.md) | 3.2 | redis | [wodby/redis] | |
| [Varnish](containers/varnish.md) | 4.1 | varnish | [wodby/wordpress-varnish] | |
| phpMyAdmin | latest | pma | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog/mailhog] ||
| Traefik | latest | traefik | [_/traefik] ||
| [Nginx](containers/nginx.md) | 1.13, 1.12 | nginx | [wodby/wordpress-nginx] ||
| [Apache](containers/apache.md) | 2.4 | php | [wodby/wordpress-apache] | |
| WordPress | 4 | php | [wodby/wordpress] ||
| [PHP](containers/php.md) | 7.1, 7.0 | php | [wodby/wordpress-php] | |
| [MariaDB](containers/mariadb.md) | 10.1 | mariadb | [wodby/mariadb] ||
| [Redis](containers/redis.md) | 3.2 | redis | [wodby/redis] | |
| [Varnish](containers/varnish.md) | 4.1 | varnish | [wodby/wordpress-varnish] | |
| [AthenaPDF](containers/athenapdf.md) | latest | athenapdf | [athenapdf-service] | |
| phpMyAdmin | latest | pma | [phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog] ||
| Portainer | latest | portainer | [portainer] ||
| Traefik | latest | traefik | [_/traefik] ||

Supported WordPress versions: 4

Expand All @@ -53,19 +59,21 @@ There 2 options how to use docker4wordpress – you can either run [vanilla](htt
2. Run containers: `docker-compose up -d`
3. Wait a few seconds for containers initialization
4. That's it! Proceed with WordPress installation at [http://wp.docker.localhost:8000](http://wp.docker.localhost:8000). Default database user, password and database name are all `wordpress`, database host is `mariadb`
5. You can see status of your containers and their logs via portainer: [http://portainer.wp.docker.localhost:8000](http://portainer.wp.docker.localhost:8000)

### 2. Mount my WordPress Codebase

0. Read [must know before you start](#must-know-before-you-start)
1. Download [docker-compose.yml file](https://github.com/wodby/docker4wordpress/blob/master/docker-compose.yml) to your WordPress project root
2. Replace php image from `wodby/wordpress` (PHP + vanilla WordPress) to `wodby/wordpress-php` (just PHP)
3. Update _nginx_ and _php_ volumes to `- ./:/var/www/html` to mount your codebase
3. Update _nginx/apache_ and _php_ volumes to `- ./:/var/www/html` to mount your codebase
4. Ensure your wp-config.php has the same credentials as _mariadb_ service
5. Optional: [import existing database](containers/mariadb.md#import-existing-database)
7. Optional: uncomment lines in the compose file to run _redis_, _varnish_, _phpmyadmin (pma)_
8. Optional: [customize domains](domains.md)
9. Run containers: `docker-compose up -d`
10. That's it! Your WordPress website should be up and running at [http://wp.docker.localhost:8000](http://wp.docker.localhost:8000). If you need to run multiple projects simultaneously see [this article](multiple-projects.md)
11. You can see status of your containers and their logs via portainer: [http://portainer.wp.docker.localhost:8000](http://portainer.wp.docker.localhost:8000)

You can stop containers by executing:
```bash
Expand Down
8 changes: 8 additions & 0 deletions docs/logs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Containers Logs

## GUI

You can find containers logs from portainer UI: [http://portainer.wp.docker.localhost:8000](http://portainer.wp.docker.localhost:8000)

## CLI

To get logs from a container simply run (skip the last param to get logs form all the containers):
```
$ docker-compose logs [service]
Expand Down
Loading

0 comments on commit 118e43c

Please sign in to comment.