Skip to content

Commit

Permalink
Update images
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Dec 12, 2017
1 parent ce51efd commit 0a5555d
Show file tree
Hide file tree
Showing 13 changed files with 442 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ env:
global:
- DOCKER_COMPOSE_VERSION=1.10.0
matrix:
- WORDPRESS_VER=4 PHP_VER=7.2
- WORDPRESS_VER=4 PHP_VER=7.1
- WORDPRESS_VER=4 PHP_VER=7.0
- WORDPRESS_VER=4 PHP_VER=5.6

install:
- sudo rm /usr/local/bin/docker-compose
Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Read [**Getting Started**](http://docker4wordpress.readthedocs.io).
[wodby/wordpress]: https://github.com/wodby/wordpress
[wodby/wordpress-php]: https://github.com/wodby/wordpress-php
[wodby/mariadb]: https://github.com/wodby/mariadb
[wodby/postgres]: https://github.com/wodby/postgres
[wodby/redis]: https://github.com/wodby/redis
[wodby/wordpress-varnish]: https://github.com/wodby/wordpress-varnish
[wodby/webgrind]: https://hub.docker.com/r/wodby/webgrind
Expand All @@ -32,20 +33,21 @@ The WordPress stack consist of the following containers:

| Container | Versions | Service name | Image | Enabled by default |
| ---------- | ---------- | ------------ | ---------------------------------- | ------------------ |
| Nginx | 1.13, 1.12 | nginx | [wodby/wordpress-nginx] ||
| Apache | 2.4 | apache | [wodby/php-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 | 2.10.0 | athenapdf | [arachnysdocker/athenapdf-service] | |
| Webgrind | 1.5 | webgrind | [wodby/webgrind] | |
| Blackfire | latest | blackfire | [blackfire/blackfire] | |
| phpMyAdmin | latest | pma | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog/mailhog] ||
| Portainer | latest | portainer | [portainer/portainer] ||
| Traefik | latest | traefik | [_/traefik] ||
| Nginx | 1.13, 1.12 | `nginx` | [wodby/wordpress-nginx] ||
| Apache | 2.4 | `apache` | [wodby/php-apache] | |
| WordPress | 4 | `php` | [wodby/wordpress] ||
| PHP | 7.x, 5.6 | `php` | [wodby/wordpress-php] | |
| MariaDB | 10.2, 10.1 | `mariadb` | [wodby/mariadb] ||
| PostgreSQL | 10.1, 9.6 | `postgres` | [wodby/postgres] | |
| Redis | 4.0, 3.2 | `redis` | [wodby/redis] | |
| Varnish | 4.1 | `varnish` | [wodby/wordpress-varnish] | |
| AthenaPDF | 2.10.0 | `athenapdf` | [arachnysdocker/athenapdf-service] | |
| Webgrind | 1.5 | `webgrind` | [wodby/webgrind] | |
| Blackfire | latest | `blackfire` | [blackfire/blackfire] | |
| phpMyAdmin | latest | `pma` | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | `mailhog` | [mailhog/mailhog] ||
| Portainer | latest | `portainer` | [portainer/portainer] ||
| Traefik | latest | `traefik` | [_/traefik] ||

Supported WordPress versions: 4

Expand Down
47 changes: 34 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: "2"

services:
mariadb:
image: wodby/mariadb:10.1-2.3.5
image: wodby/mariadb:10.2-3.0.2
# image: wodby/mariadb:10.1-3.0.2
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
Expand All @@ -12,13 +13,33 @@ services:
# - ./mariadb-init:/docker-entrypoint-initdb.d # Place init .sql file(s) here.
# - /path/to/mariadb/data/on/host:/var/lib/mysql # I want to manage volumes manually.

# postgres:
# image: wodby/postgres:10.1-1.2.0
## image: wodby/postgres:9.6-1.2.0
# environment:
# POSTGRES_PASSWORD: password
# POSTGRES_DB: wordpress
# POSTGRES_USER: wordpress
# volumes:
# - ./postgres-init:/docker-entrypoint-initdb.d # Place init file(s) here.
# - /path/to/postgres/data/on/host:/var/lib/postgresql/data # I want to manage volumes manually.

php:
image: wodby/wordpress:4-7.1-3.0.0
# image: wodby/wordpress:4-7.0-3.0.0
# image: wodby/wordpress:4-5.6-3.0.0
# image: wodby/wordpress-php:7.1-3.0.0
# image: wodby/wordpress-php:7.0-3.0.0
# image: wodby/wordpress-php:5.6-3.0.0
# 1. Images with vanilla WordPress – wodby/wordpress:[WP_VERSION]-[PHP_VERSION]-[STABILITY_TAG].
image: wodby/wordpress:4-7.2-3.3.1
# image: wodby/wordpress:4-7.1-3.3.1
# image: wodby/wordpress:4-7.0-3.3.1
# image: wodby/wordpress:4-5.6-3.3.1
# 2. Images without WordPress – wodby/wordpress-php:[PHP_VERSION]-[STABILITY_TAG].
# image: wodby/wordpress-php:7.2-3.3.1
# image: wodby/wordpress-php:7.1-3.3.1
# image: wodby/wordpress-php:7.0-3.3.1
# image: wodby/wordpress-php:5.6-3.3.1
# 3. Images without WordPress – wodby/wordpress-php:[PHP_VERSION]-[STABILITY_TAG].Version for development (--enable-debug)
# image: wodby/wordpress-php:7.2-dev-3.3.1
# image: wodby/wordpress-php:7.1-dev-3.3.1
# image: wodby/wordpress-php:7.0-dev-3.3.1
# image: wodby/wordpress-php:5.6-dev-3.3.1
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_FPM_CLEAR_ENV: "no"
Expand All @@ -37,8 +58,8 @@ services:
# - files:/mnt/files

nginx:
image: wodby/wordpress-nginx:4-1.13-3.0.1
# image: wodby/wordpress-nginx:4-1.12-3.0.1
image: wodby/wordpress-nginx:4-1.13-3.0.2
# image: wodby/wordpress-nginx:4-1.12-3.0.2
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
Expand All @@ -56,7 +77,7 @@ services:
- 'traefik.frontend.rule=Host:wp.docker.localhost'

# apache:
# image: wodby/php-apache:2.4-2.0.0
# image: wodby/php-apache:2.4-2.0.2
# depends_on:
# - php
# environment:
Expand All @@ -74,7 +95,7 @@ services:
# - 'traefik.frontend.rule=Host:wp.docker.localhost'

# varnish:
# image: wodby/wordpress-varnish:4.1-2.2.0
# image: wodby/wordpress-varnish:4.1-2.3.1
# depends_on:
# - nginx
# environment:
Expand All @@ -87,8 +108,8 @@ services:
# - 'traefik.frontend.rule=Host:varnish.wp.docker.localhost'

# redis:
# image: wodby/redis:3.2-2.1.3
## image: wodby/redis:3.2-2.1.3
# image: wodby/redis:4.0-2.1.4
## image: wodby/redis:3.2-2.1.4

# pma:
# image: phpmyadmin/phpmyadmin
Expand Down
34 changes: 18 additions & 16 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The WordPress stack consist of the following containers:
[wodby/wordpress]: https://github.com/wodby/wordpress
[wodby/wordpress-php]: https://github.com/wodby/wordpress-php
[wodby/mariadb]: https://github.com/wodby/mariadb
[wodby/postgres]: https://github.com/wodby/postgres
[wodby/redis]: https://github.com/wodby/redis
[wodby/wordpress-varnish]: https://github.com/wodby/wordpress-varnish
[wodby/webgrind]: https://hub.docker.com/r/wodby/webgrind
Expand All @@ -32,22 +33,23 @@ The WordPress stack consist of the following containers:
[Blackfire]: containers/blackfire.md
[AthenaPDF]: containers/athenapdf.md

| Container | Versions | Service name | Image | Enabled by default |
| ----------- | ---------- | ------------ | ---------------------------------- | ------------------ |
| [Nginx] | 1.13, 1.12 | nginx | [wodby/wordpress-nginx] ||
| [Apache] | 2.4 | apache | [wodby/php-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] | |
| [Webgrind] | 1.5 | webgrind | [wodby/webgrind] | |
| [Blackfire] | latest | blackfire | [blackfire/blackfire] | |
| [AthenaPDF] | 2.10.0 | athenapdf | [arachnysdocker/athenapdf-service] | |
| phpMyAdmin | latest | pma | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | mailhog | [mailhog/mailhog] ||
| Portainer | latest | portainer | [portainer/portainer] ||
| Traefik | latest | traefik | [_/traefik] ||
| Container | Versions | Service name | Image | Enabled by default |
| ------------ | ---------- | ------------ | ---------------------------------- | ------------------ |
| [Nginx] | 1.13, 1.12 | `nginx` | [wodby/wordpress-nginx] ||
| [Apache] | 2.4 | `apache` | [wodby/php-apache] | |
| WordPress | 4 | `php` | [wodby/wordpress] ||
| [PHP] | 7.x, 5.6 | `php` | [wodby/wordpress-php] | |
| [MariaDB] | 10.2, 10.1 | `mariadb` | [wodby/mariadb] ||
| [PostgreSQL] | 10.1, 9.6 | `postgres` | [wodby/postgres] | |
| [Redis] | 4.0, 3.2 | `redis` | [wodby/redis] | |
| [Varnish] | 4.1 | `varnish` | [wodby/wordpress-varnish] | |
| [Webgrind] | 1.5 | `webgrind` | [wodby/webgrind] | |
| [Blackfire] | latest | `blackfire` | [blackfire/blackfire] | |
| [AthenaPDF] | 2.10.0 | `athenapdf` | [arachnysdocker/athenapdf-service] | |
| phpMyAdmin | latest | `pma` | [phpmyadmin/phpmyadmin] | |
| Mailhog | latest | `mailhog` | [mailhog/mailhog] ||
| Portainer | latest | `portainer` | [portainer/portainer] ||
| Traefik | latest | `traefik` | [_/traefik] ||

Supported WordPress versions: 4

Expand Down
51 changes: 51 additions & 0 deletions test/4/5.6/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: "2"

services:
mariadb:
image: $MARIADB
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress

php:
image: $WP4_PHP56
environment:
WODBY_APP_NAME: drupal
DEBUG: 1
WP_VERSION: 4
PHP_SENDMAIL_PATH: '/bin/true'
BASE_URL: http://wordpress.docker.localhost
volumes:
- codebase:/var/www/html/
- ./test.sh:/var/www/html/test.sh
- ./wp-config.php:/var/www/html/wp-config.php

nginx:
image: $WP4_NGINX
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
volumes:
- codebase:/var/www/html/
depends_on:
- php

varnish:
image: $WP_VARNISH
depends_on:
- nginx
environment:
VARNISH_SECRET: secret
VARNISH_BACKEND_HOST: nginx
VARNISH_BACKEND_PORT: 80
VARNISH_MEMORY_SIZE: 256M
VARNISH_STORAGE_SIZE: 1024M

redis:
image: $REDIS

volumes:
codebase:
17 changes: 17 additions & 0 deletions test/4/5.6/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -e

if [[ -n "${DEBUG}" ]]; then
set -x
fi

. ../../images.env

# TODO: return health checks
docker-compose up -d
docker-compose exec mariadb make check-ready max_try=12 wait_seconds=3 -f /usr/local/bin/actions.mk
docker-compose exec php make check-ready -f /usr/local/bin/actions.mk
docker-compose exec --user=0 php chown -R www-data:www-data /var/www/html
docker-compose exec php ./test.sh
docker-compose down
22 changes: 22 additions & 0 deletions test/4/5.6/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

if [[ -n "${DEBUG}" ]]; then
set -x
fi

WP_DOMAIN="$( echo "${BASE_URL}" | sed 's/https\?:\/\///' )"

make init -f /usr/local/bin/actions.mk

wp core install --url="${BASE_URL}" --title="WordPress 4" \
--admin_user=admin --admin_password=admin [email protected]

# TODO: test redis and varnish.
wp plugin install redis-cache --activate
wp plugin install vcaching --activate

echo -n "Checking WordPress homepage... "
curl -s -H "host: ${WP_DOMAIN}" "nginx" | grep -q "Welcome to WordPress"
echo "OK"
92 changes: 92 additions & 0 deletions test/4/5.6/wp-config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpress');

/** MySQL database password */
define('DB_PASSWORD', 'wordpress');

/** MySQL hostname */
define('DB_HOST', 'mariadb');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');

define('WP_REDIS_HOST', 'redis');
define('WP_REDIS_PORT', '6379');

/**#@-*/

/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';

/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
* @link https://codex.wordpress.org/Debugging_in_WordPress
*/
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Loading

0 comments on commit 0a5555d

Please sign in to comment.