From 0a5555dea361317baf80c2f9ecbb859359618c1e Mon Sep 17 00:00:00 2001 From: Chingis Sandanov Date: Tue, 12 Dec 2017 18:54:04 +0700 Subject: [PATCH] Update images --- .travis.yml | 2 + README.md | 30 ++++++------ docker-compose.yml | 47 +++++++++++++----- docs/index.md | 34 +++++++------ test/4/5.6/docker-compose.yml | 51 +++++++++++++++++++ test/4/5.6/run.sh | 17 +++++++ test/4/5.6/test.sh | 22 +++++++++ test/4/5.6/wp-config.php | 92 +++++++++++++++++++++++++++++++++++ test/4/7.2/docker-compose.yml | 51 +++++++++++++++++++ test/4/7.2/run.sh | 17 +++++++ test/4/7.2/test.sh | 22 +++++++++ test/4/7.2/wp-config.php | 92 +++++++++++++++++++++++++++++++++++ test/images.env | 14 +++--- 13 files changed, 442 insertions(+), 49 deletions(-) create mode 100644 test/4/5.6/docker-compose.yml create mode 100755 test/4/5.6/run.sh create mode 100755 test/4/5.6/test.sh create mode 100644 test/4/5.6/wp-config.php create mode 100644 test/4/7.2/docker-compose.yml create mode 100755 test/4/7.2/run.sh create mode 100755 test/4/7.2/test.sh create mode 100644 test/4/7.2/wp-config.php diff --git a/.travis.yml b/.travis.yml index 248d36c8f..3ab6521b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 7afecc6f8..c2195cb26 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 584523892..0acca20e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 @@ -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" @@ -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 @@ -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: @@ -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: @@ -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 diff --git a/docs/index.md b/docs/index.md index d0306a5d9..565538a19 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 @@ -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 diff --git a/test/4/5.6/docker-compose.yml b/test/4/5.6/docker-compose.yml new file mode 100644 index 000000000..7dd5561b1 --- /dev/null +++ b/test/4/5.6/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/test/4/5.6/run.sh b/test/4/5.6/run.sh new file mode 100755 index 000000000..607bd9d9d --- /dev/null +++ b/test/4/5.6/run.sh @@ -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 diff --git a/test/4/5.6/test.sh b/test/4/5.6/test.sh new file mode 100755 index 000000000..3f33d3ebc --- /dev/null +++ b/test/4/5.6/test.sh @@ -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 --admin_email=admin@example.com + +# 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" diff --git a/test/4/5.6/wp-config.php b/test/4/5.6/wp-config.php new file mode 100644 index 000000000..b499e7dfa --- /dev/null +++ b/test/4/5.6/wp-config.php @@ -0,0 +1,92 @@ +