Skip to content

Commit

Permalink
Merge pull request #13 from AlexP11223/wp-ver
Browse files Browse the repository at this point in the history
Add WORDPRESS_VERSION env var
  • Loading branch information
XedinUnknown committed Jan 11, 2021
2 parents aa13a0a + 04f31c9 commit 92f70bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ PROJECT_NAME=me_plugin
PHP_BUILD_VERSION=7.1
PHP_TEST_VERSION=7.4

WORDPRESS_VERSION=5.6.0

DB_ROOT_PASSWORD=root
DB_NAME=wordpress
DB_USER_NAME=wordpress
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Use Composer to bootstrap your project.
* `PHP_TEST_VERSION`* - The version of PHP, on which the plugin will be _run_. This should
correspond to the maximal PHP requirement of your plugin. Used to determine the tag of
the [`wordpress`][] image.
* `WORDPRESS_VERSION`* - The version of WordPress, on which the plugin will be _run_. Used to determine the tag of
the [`wordpress`][] image.
* `DB_USER_PASSWORD`* - This and other `DB_*` variables are used to determine the password
to the WordPress database. Change these if you want to secure your deployed application.
* `WP_DOMAIN`* - The domain name of the WordPress application, which contains your plugin.
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
args:
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
WORDPRESS_VERSION: $WORDPRESS_VERSION
PROJECT_MOUNT_PATH: $PROJECT_MOUNT_PATH
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
DOCROOT_PATH: $DOCROOT_PATH
Expand Down Expand Up @@ -69,6 +70,7 @@ services:
target: build
args:
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
WORDPRESS_VERSION: $WORDPRESS_VERSION
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
container_name: "${PROJECT_NAME}_build"
working_dir: ${BUILD_ROOT_PATH}
Expand All @@ -84,6 +86,7 @@ services:
BUILD_ROOT_PATH: $BUILD_ROOT_PATH
PHP_BUILD_VERSION: $PHP_BUILD_VERSION
PHP_TEST_VERSION: $PHP_TEST_VERSION
WORDPRESS_VERSION: $WORDPRESS_VERSION
container_name: "${PROJECT_NAME}_test"
working_dir: ${BUILD_ROOT_PATH}
volumes:
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile_wp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG PHP_BUILD_VERSION
ARG PHP_TEST_VERSION
ARG WORDPRESS_VERSION

# Composer on correct PHP version
FROM php:${PHP_BUILD_VERSION}-cli as build
Expand Down Expand Up @@ -40,7 +41,7 @@ RUN composer install


# WordPress for development
FROM wordpress:5-php${PHP_TEST_VERSION}-apache as dev
FROM wordpress:${WORDPRESS_VERSION}-php${PHP_TEST_VERSION}-apache as dev

ARG PROJECT_MOUNT_PATH
ARG BUILD_ROOT_PATH
Expand Down

0 comments on commit 92f70bc

Please sign in to comment.