Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' for release 0.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
davidalger committed Aug 10, 2019
2 parents 9efa0a9 + fa51213 commit 07131b1
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.1.6
===============

* Changed the default value `env-init` uses for `TRAEFIK_SUBDOMAIN` to `app` (previously it would match the environment type)
* Added mount of `~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro` to each env type's `php-fpm` and `php-debug` containers to support FPM images appending this CA root to the trusted ca-bundle on container start
* Added `extra_hosts` entry to set an entry in `/etc/hosts` within `php-fpm` and `php-debug` containers pointing the project's primary domain to the Traefik service IP address so `curl` and `SoapClient` (for example) may work inside a project's FPM services
* Added FPM containers to the "warden" network so they'll be able to route http requests to Traefik

0.1.5
===============

Expand Down
2 changes: 1 addition & 1 deletion commands/env-init.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ cat > "${WARDEN_ENV_PATH}/.env" <<EOF
WARDEN_ENV_NAME=${WARDEN_ENV_NAME}
WARDEN_ENV_TYPE=${WARDEN_ENV_TYPE}
TRAEFIK_DOMAIN=${WARDEN_ENV_NAME}.test
TRAEFIK_SUBDOMAIN=${WARDEN_ENV_TYPE}
TRAEFIK_SUBDOMAIN=app
EOF
4 changes: 4 additions & 0 deletions commands/env.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ if [[ -f "${WARDEN_ENV_PATH}/.warden/warden-env.${WARDEN_ENV_SUBT}.yml" ]]; then
DOCKER_COMPOSE_ARGS+=("${WARDEN_ENV_PATH}/.warden/warden-env.${WARDEN_ENV_SUBT}.yml")
fi

## lookup internal (warden docker network) IP address of traefik container (do not fail if traefik is stopped)
export TRAEFIK_ADDRESS="$(docker container inspect traefik \
--format '{{.NetworkSettings.Networks.warden.IPAddress}}' 2>/dev/null || true)"

## anything not caught above is simply passed through to docker-compose to orchestrate
docker-compose \
--project-directory "${WARDEN_ENV_PATH}" -p "${WARDEN_ENV_NAME}" \
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.5
Warden version 0.1.6
\033[33mUsage:\033[0m
command [options] [arguments]
Expand Down
14 changes: 13 additions & 1 deletion environments/magento1.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,42 @@ services:
labels:
- traefik.enable=true
- traefik.port=80
- traefik.frontend.rule=Host:${TRAEFIK_SUBDOMAIN:-www}.${TRAEFIK_DOMAIN}
- traefik.frontend.rule=Host:${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}
networks:
- warden
- default

php-fpm:
hostname: php-fpm
image: davidalger/warden:mage1-fpm-${PHP_VERSION:-7.2}
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
- db
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer:delegated
- .${WARDEN_WEB_ROOT:-}/:/var/www/html:delegated
networks:
- default
- warden

php-debug:
hostname: php-debug
image: davidalger/warden:mage1-fpm-${PHP_VERSION:-7.2}-debug
environment:
- PHP_IDE_CONFIG=serverName=${WARDEN_ENV_NAME}-docker
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
- db
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer:delegated
- .${WARDEN_WEB_ROOT:-}/:/var/www/html:delegated
networks:
- default
- warden

db:
hostname: mariadb
Expand Down
12 changes: 11 additions & 1 deletion environments/magento2.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,34 @@ services:
- nginx
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:${TRAEFIK_SUBDOMAIN:-www}.${TRAEFIK_DOMAIN}
- traefik.frontend.rule=Host:${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}
networks:
- warden
- default

php-fpm:
hostname: php-fpm
image: davidalger/warden:mage2-fpm-${PHP_VERSION:-7.2}
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
- db
networks:
- default
- warden

php-debug:
hostname: php-debug
image: davidalger/warden:mage2-fpm-${PHP_VERSION:-7.2}-debug
environment:
- PHP_IDE_CONFIG=serverName=${WARDEN_ENV_NAME}-docker
extra_hosts:
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
depends_on:
- db
networks:
- default
- warden

db:
hostname: mariadb
Expand Down
2 changes: 2 additions & 0 deletions environments/magento2.darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ services:

php-fpm:
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer:delegated
- .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:delegated
- appdata:/var/www/html

php-debug:
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer:delegated
- .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:delegated
- appdata:/var/www/html
Expand Down
2 changes: 2 additions & 0 deletions environments/magento2.linux-gnu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ services:

php-fpm:
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer
- .${WARDEN_WEB_ROOT:-}/:/var/www/html

php-debug:
volumes:
- ~/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
- ~/.composer:/home/www-data/.composer
- .${WARDEN_WEB_ROOT:-}/:/var/www/html

0 comments on commit 07131b1

Please sign in to comment.