Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' for release 0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidalger committed Sep 6, 2019
2 parents 3fcfa9c + 37dc8ec commit c42efec
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.1.8
===============

* Introduced `NODE_VERSION` environment variable to specify which version of NodeJS to install in FPM images during container startup (by default v10 is now pre-installed in `mage1-fpm` and `mage2-fpm` images at the time of this release; latest images must be pulled from Docker Hub for this to work).
* Fixed issue where if sub-directory included a relative symlink pointing `.env` at parent project's `.env` file, `--project-dir` passed to `docker-compose` could be specified incorrectly when running warden from within the given sub-directory.

0.1.7
===============

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,14 @@ To configure your project with a non-default PHP version, add the following to t

PHP_VERSION=7.2

The versions of MariaDB, Elasticsearch, Varnish and Redis may also be similarly configured using variables in the `.env` file:
The versions of MariaDB, Elasticsearch, Varnish, Redis, and NodeJS may also be similarly configured using variables in the `.env` file:

* `MARIADB_VERSION`
* `ELASTICSEARCH_VERSION`
* `REDIS_VERSION`
* `VARNISH_VERSION`
* `RABBITMQ_VERSION`
* `NODE_VERSION`

## Warden Usage

Expand Down
2 changes: 1 addition & 1 deletion commands/usage.help
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WARDEN_HEADER='

WARDEN_USAGE=$(cat <<EOF
${WARDEN_HEADER:1}
Warden version 0.1.7
Warden version 0.1.8
\033[33mUsage:\033[0m
command [options] [arguments]
Expand Down
3 changes: 3 additions & 0 deletions environments/magento1.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services:
php-fpm:
hostname: php-fpm
image: davidalger/warden:mage1-fpm-${PHP_VERSION:-7.2}
environment:
- NODE_VERSION=${NODE_VERSION:-10}
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
Expand All @@ -37,6 +39,7 @@ services:
hostname: php-debug
image: davidalger/warden:mage1-fpm-${PHP_VERSION:-7.2}-debug
environment:
- NODE_VERSION=${NODE_VERSION:-10}
- PHP_IDE_CONFIG=serverName=${WARDEN_ENV_NAME}-docker
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
Expand Down
3 changes: 3 additions & 0 deletions environments/magento2.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ services:
php-fpm:
hostname: php-fpm
image: davidalger/warden:mage2-fpm-${PHP_VERSION:-7.2}
environment:
- NODE_VERSION=${NODE_VERSION:-10}
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
Expand All @@ -34,6 +36,7 @@ services:
hostname: php-debug
image: davidalger/warden:mage2-fpm-${PHP_VERSION:-7.2}-debug
environment:
- NODE_VERSION=${NODE_VERSION:-10}
- PHP_IDE_CONFIG=serverName=${WARDEN_ENV_NAME}-docker
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
Expand Down
10 changes: 10 additions & 0 deletions utils/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ function locateEnvPath () {
return 1
fi

## Resolve .env symlink should it exist in project sub-directory allowing sub-stacks to use relative link to parent
WARDEN_ENV_PATH="$(
cd "$(
dirname "$(
(readlink "${WARDEN_ENV_PATH}/.env" || echo "${WARDEN_ENV_PATH}/.env")
)"
)" >/dev/null \
&& pwd
)"

echo "${WARDEN_ENV_PATH}"
}

Expand Down

0 comments on commit c42efec

Please sign in to comment.