From a6e4f7c0031edc11943605512aa560d15bf4722e Mon Sep 17 00:00:00 2001 From: Hardy Johnson Date: Thu, 6 Jun 2024 10:23:19 -0700 Subject: [PATCH] Add environment version support. --- commands/env-init.cmd | 3 ++ commands/env-init.help | 2 +- commands/env.cmd | 10 ++--- commands/sync.cmd | 10 ++--- environments/drupal/{ => default}/db.base.yml | 0 .../drupal/{ => default}/drupal.base.yml | 0 .../drupal/{ => default}/drupal.darwin.yml | 0 .../drupal/{ => default}/drupal.mutagen.yml | 0 .../{ => default}/drupal.settings.base.yml | 0 environments/drupal/{ => default}/init.env | 0 .../drupal/{ => default}/init.env.cmd | 0 .../laravel/{ => default}/db.base.yml | 0 environments/laravel/{ => default}/init.env | 0 .../laravel/{ => default}/laravel.base.yml | 0 .../local/{ => default}/local.base.yml | 0 .../magento1/{ => default}/db.base.yml | 0 environments/magento1/{ => default}/init.env | 0 .../magento1/{ => default}/magento1.base.yml | 0 .../magento1.blackfire.darwin.yml | 0 .../{ => default}/magento1.darwin.yml | 0 .../{ => default}/magento1.mutagen.yml | 0 environments/magento2/{ => 2.4.5}/db.base.yml | 0 environments/magento2/2.4.5/init.env | 37 +++++++++++++++++ .../magento2/{ => 2.4.5}/magento2.base.yml | 0 .../{ => 2.4.5}/magento2.blackfire.darwin.yml | 0 .../magento2/{ => 2.4.5}/magento2.darwin.yml | 0 .../{ => 2.4.5}/magento2.magepack.base.yml | 0 .../{ => 2.4.5}/magento2.magepack.darwin.yml | 0 .../{ => 2.4.5}/magento2.magepack.linux.yml | 0 .../magento2/{ => 2.4.5}/magento2.mutagen.yml | 0 .../magento2.splitdb.checkout.base.yml | 0 .../magento2.splitdb.sales.base.yml | 0 .../{ => 2.4.5}/magento2.tests.base.yml | 0 environments/magento2/2.4.6/db.base.yml | 11 +++++ environments/magento2/2.4.6/init.env | 37 +++++++++++++++++ environments/magento2/2.4.6/magento2.base.yml | 23 +++++++++++ .../2.4.6/magento2.blackfire.darwin.yml | 10 +++++ .../magento2/2.4.6/magento2.darwin.yml | 15 +++++++ .../magento2/2.4.6/magento2.magepack.base.yml | 12 ++++++ .../2.4.6/magento2.magepack.darwin.yml | 7 ++++ .../2.4.6/magento2.magepack.linux.yml | 6 +++ .../magento2/2.4.6/magento2.mutagen.yml | 30 ++++++++++++++ .../2.4.6/magento2.splitdb.checkout.base.yml | 25 ++++++++++++ .../2.4.6/magento2.splitdb.sales.base.yml | 25 ++++++++++++ .../magento2/2.4.6/magento2.tests.base.yml | 21 ++++++++++ environments/magento2/2.4.7/db.base.yml | 11 +++++ environments/magento2/2.4.7/init.env | 37 +++++++++++++++++ environments/magento2/2.4.7/magento2.base.yml | 23 +++++++++++ .../2.4.7/magento2.blackfire.darwin.yml | 10 +++++ .../magento2/2.4.7/magento2.darwin.yml | 15 +++++++ .../magento2/2.4.7/magento2.magepack.base.yml | 12 ++++++ .../2.4.7/magento2.magepack.darwin.yml | 7 ++++ .../2.4.7/magento2.magepack.linux.yml | 6 +++ .../magento2/2.4.7/magento2.mutagen.yml | 30 ++++++++++++++ .../2.4.7/magento2.splitdb.checkout.base.yml | 25 ++++++++++++ .../2.4.7/magento2.splitdb.sales.base.yml | 25 ++++++++++++ .../magento2/2.4.7/magento2.tests.base.yml | 21 ++++++++++ environments/magento2/default/db.base.yml | 11 +++++ environments/magento2/{ => default}/init.env | 0 .../magento2/default/magento2.base.yml | 23 +++++++++++ .../default/magento2.blackfire.darwin.yml | 10 +++++ .../magento2/default/magento2.darwin.yml | 15 +++++++ .../default/magento2.magepack.base.yml | 12 ++++++ .../default/magento2.magepack.darwin.yml | 7 ++++ .../default/magento2.magepack.linux.yml | 6 +++ .../magento2/default/magento2.mutagen.yml | 30 ++++++++++++++ .../magento2.splitdb.checkout.base.yml | 25 ++++++++++++ .../default/magento2.splitdb.sales.base.yml | 25 ++++++++++++ .../magento2/default/magento2.tests.base.yml | 21 ++++++++++ .../shopware/{ => default}/db.base.yml | 0 environments/shopware/{ => default}/init.env | 0 .../shopware/{ => default}/shopware.base.yml | 0 .../{ => default}/shopware.darwin.yml | 0 .../{ => default}/shopware.mutagen.yml | 0 .../symfony/{ => default}/db.base.yml | 0 environments/symfony/{ => default}/init.env | 0 .../symfony/{ => default}/symfony.base.yml | 0 .../wordpress/{ => default}/db.base.yml | 0 environments/wordpress/{ => default}/init.env | 0 .../{ => default}/wordpress.base.yml | 0 utils/env.sh | 40 +++++++++++-------- 81 files changed, 703 insertions(+), 28 deletions(-) rename environments/drupal/{ => default}/db.base.yml (100%) rename environments/drupal/{ => default}/drupal.base.yml (100%) rename environments/drupal/{ => default}/drupal.darwin.yml (100%) rename environments/drupal/{ => default}/drupal.mutagen.yml (100%) rename environments/drupal/{ => default}/drupal.settings.base.yml (100%) rename environments/drupal/{ => default}/init.env (100%) rename environments/drupal/{ => default}/init.env.cmd (100%) rename environments/laravel/{ => default}/db.base.yml (100%) rename environments/laravel/{ => default}/init.env (100%) rename environments/laravel/{ => default}/laravel.base.yml (100%) rename environments/local/{ => default}/local.base.yml (100%) rename environments/magento1/{ => default}/db.base.yml (100%) rename environments/magento1/{ => default}/init.env (100%) rename environments/magento1/{ => default}/magento1.base.yml (100%) rename environments/magento1/{ => default}/magento1.blackfire.darwin.yml (100%) rename environments/magento1/{ => default}/magento1.darwin.yml (100%) rename environments/magento1/{ => default}/magento1.mutagen.yml (100%) rename environments/magento2/{ => 2.4.5}/db.base.yml (100%) create mode 100644 environments/magento2/2.4.5/init.env rename environments/magento2/{ => 2.4.5}/magento2.base.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.blackfire.darwin.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.darwin.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.magepack.base.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.magepack.darwin.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.magepack.linux.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.mutagen.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.splitdb.checkout.base.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.splitdb.sales.base.yml (100%) rename environments/magento2/{ => 2.4.5}/magento2.tests.base.yml (100%) create mode 100644 environments/magento2/2.4.6/db.base.yml create mode 100644 environments/magento2/2.4.6/init.env create mode 100644 environments/magento2/2.4.6/magento2.base.yml create mode 100644 environments/magento2/2.4.6/magento2.blackfire.darwin.yml create mode 100644 environments/magento2/2.4.6/magento2.darwin.yml create mode 100644 environments/magento2/2.4.6/magento2.magepack.base.yml create mode 100644 environments/magento2/2.4.6/magento2.magepack.darwin.yml create mode 100644 environments/magento2/2.4.6/magento2.magepack.linux.yml create mode 100644 environments/magento2/2.4.6/magento2.mutagen.yml create mode 100644 environments/magento2/2.4.6/magento2.splitdb.checkout.base.yml create mode 100644 environments/magento2/2.4.6/magento2.splitdb.sales.base.yml create mode 100644 environments/magento2/2.4.6/magento2.tests.base.yml create mode 100644 environments/magento2/2.4.7/db.base.yml create mode 100644 environments/magento2/2.4.7/init.env create mode 100644 environments/magento2/2.4.7/magento2.base.yml create mode 100644 environments/magento2/2.4.7/magento2.blackfire.darwin.yml create mode 100644 environments/magento2/2.4.7/magento2.darwin.yml create mode 100644 environments/magento2/2.4.7/magento2.magepack.base.yml create mode 100644 environments/magento2/2.4.7/magento2.magepack.darwin.yml create mode 100644 environments/magento2/2.4.7/magento2.magepack.linux.yml create mode 100644 environments/magento2/2.4.7/magento2.mutagen.yml create mode 100644 environments/magento2/2.4.7/magento2.splitdb.checkout.base.yml create mode 100644 environments/magento2/2.4.7/magento2.splitdb.sales.base.yml create mode 100644 environments/magento2/2.4.7/magento2.tests.base.yml create mode 100644 environments/magento2/default/db.base.yml rename environments/magento2/{ => default}/init.env (100%) create mode 100644 environments/magento2/default/magento2.base.yml create mode 100644 environments/magento2/default/magento2.blackfire.darwin.yml create mode 100644 environments/magento2/default/magento2.darwin.yml create mode 100644 environments/magento2/default/magento2.magepack.base.yml create mode 100644 environments/magento2/default/magento2.magepack.darwin.yml create mode 100644 environments/magento2/default/magento2.magepack.linux.yml create mode 100644 environments/magento2/default/magento2.mutagen.yml create mode 100644 environments/magento2/default/magento2.splitdb.checkout.base.yml create mode 100644 environments/magento2/default/magento2.splitdb.sales.base.yml create mode 100644 environments/magento2/default/magento2.tests.base.yml rename environments/shopware/{ => default}/db.base.yml (100%) rename environments/shopware/{ => default}/init.env (100%) rename environments/shopware/{ => default}/shopware.base.yml (100%) rename environments/shopware/{ => default}/shopware.darwin.yml (100%) rename environments/shopware/{ => default}/shopware.mutagen.yml (100%) rename environments/symfony/{ => default}/db.base.yml (100%) rename environments/symfony/{ => default}/init.env (100%) rename environments/symfony/{ => default}/symfony.base.yml (100%) rename environments/wordpress/{ => default}/db.base.yml (100%) rename environments/wordpress/{ => default}/init.env (100%) rename environments/wordpress/{ => default}/wordpress.base.yml (100%) diff --git a/commands/env-init.cmd b/commands/env-init.cmd index ad769c86..0efeddd1 100644 --- a/commands/env-init.cmd +++ b/commands/env-init.cmd @@ -32,6 +32,8 @@ if [ -z "${WARDEN_ENV_TYPE}" ]; then done fi +WARDEN_ENV_VERSION="${WARDEN_PARAMS[2]:-default}" + # Verify the auto-select and/or type path resolves correctly before setting it assertValidEnvType || exit $? @@ -39,6 +41,7 @@ assertValidEnvType || exit $? cat > "${WARDEN_ENV_PATH}/.env" < + env-init \033[33mOptions:\033[0m -h, --help Display this help menu diff --git a/commands/env.cmd b/commands/env.cmd index 7f464e1a..490c0efc 100644 --- a/commands/env.cmd +++ b/commands/env.cmd @@ -175,14 +175,14 @@ TRAEFIK_ADDRESS="$(docker container inspect traefik \ export TRAEFIK_ADDRESS; if [[ $OSTYPE =~ ^darwin ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + export MUTAGEN_SYNC_FILE="${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" - if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then + export MUTAGEN_SYNC_FILE="${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" fi - if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then + export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" fi if [[ -f "${WARDEN_ENV_PATH}/.warden/mutagen.yml" ]]; then diff --git a/commands/sync.cmd b/commands/sync.cmd index 00de23ec..7524c981 100644 --- a/commands/sync.cmd +++ b/commands/sync.cmd @@ -29,14 +29,14 @@ if [[ $OSTYPE =~ ^darwin ]] && ! test $(version ${MUTAGEN_VERSION}) -ge $(versio fi if [[ $OSTYPE =~ ^darwin && -z "${MUTAGEN_SYNC_FILE}" ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + export MUTAGEN_SYNC_FILE="${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" - if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then + export MUTAGEN_SYNC_FILE="${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" fi - if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then - export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.mutagen.yml" + if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" ]]; then + export MUTAGEN_SYNC_FILE="${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}.mutagen.yml" fi if [[ -f "${WARDEN_ENV_PATH}/.warden/mutagen.yml" ]]; then diff --git a/environments/drupal/db.base.yml b/environments/drupal/default/db.base.yml similarity index 100% rename from environments/drupal/db.base.yml rename to environments/drupal/default/db.base.yml diff --git a/environments/drupal/drupal.base.yml b/environments/drupal/default/drupal.base.yml similarity index 100% rename from environments/drupal/drupal.base.yml rename to environments/drupal/default/drupal.base.yml diff --git a/environments/drupal/drupal.darwin.yml b/environments/drupal/default/drupal.darwin.yml similarity index 100% rename from environments/drupal/drupal.darwin.yml rename to environments/drupal/default/drupal.darwin.yml diff --git a/environments/drupal/drupal.mutagen.yml b/environments/drupal/default/drupal.mutagen.yml similarity index 100% rename from environments/drupal/drupal.mutagen.yml rename to environments/drupal/default/drupal.mutagen.yml diff --git a/environments/drupal/drupal.settings.base.yml b/environments/drupal/default/drupal.settings.base.yml similarity index 100% rename from environments/drupal/drupal.settings.base.yml rename to environments/drupal/default/drupal.settings.base.yml diff --git a/environments/drupal/init.env b/environments/drupal/default/init.env similarity index 100% rename from environments/drupal/init.env rename to environments/drupal/default/init.env diff --git a/environments/drupal/init.env.cmd b/environments/drupal/default/init.env.cmd similarity index 100% rename from environments/drupal/init.env.cmd rename to environments/drupal/default/init.env.cmd diff --git a/environments/laravel/db.base.yml b/environments/laravel/default/db.base.yml similarity index 100% rename from environments/laravel/db.base.yml rename to environments/laravel/default/db.base.yml diff --git a/environments/laravel/init.env b/environments/laravel/default/init.env similarity index 100% rename from environments/laravel/init.env rename to environments/laravel/default/init.env diff --git a/environments/laravel/laravel.base.yml b/environments/laravel/default/laravel.base.yml similarity index 100% rename from environments/laravel/laravel.base.yml rename to environments/laravel/default/laravel.base.yml diff --git a/environments/local/local.base.yml b/environments/local/default/local.base.yml similarity index 100% rename from environments/local/local.base.yml rename to environments/local/default/local.base.yml diff --git a/environments/magento1/db.base.yml b/environments/magento1/default/db.base.yml similarity index 100% rename from environments/magento1/db.base.yml rename to environments/magento1/default/db.base.yml diff --git a/environments/magento1/init.env b/environments/magento1/default/init.env similarity index 100% rename from environments/magento1/init.env rename to environments/magento1/default/init.env diff --git a/environments/magento1/magento1.base.yml b/environments/magento1/default/magento1.base.yml similarity index 100% rename from environments/magento1/magento1.base.yml rename to environments/magento1/default/magento1.base.yml diff --git a/environments/magento1/magento1.blackfire.darwin.yml b/environments/magento1/default/magento1.blackfire.darwin.yml similarity index 100% rename from environments/magento1/magento1.blackfire.darwin.yml rename to environments/magento1/default/magento1.blackfire.darwin.yml diff --git a/environments/magento1/magento1.darwin.yml b/environments/magento1/default/magento1.darwin.yml similarity index 100% rename from environments/magento1/magento1.darwin.yml rename to environments/magento1/default/magento1.darwin.yml diff --git a/environments/magento1/magento1.mutagen.yml b/environments/magento1/default/magento1.mutagen.yml similarity index 100% rename from environments/magento1/magento1.mutagen.yml rename to environments/magento1/default/magento1.mutagen.yml diff --git a/environments/magento2/db.base.yml b/environments/magento2/2.4.5/db.base.yml similarity index 100% rename from environments/magento2/db.base.yml rename to environments/magento2/2.4.5/db.base.yml diff --git a/environments/magento2/2.4.5/init.env b/environments/magento2/2.4.5/init.env new file mode 100644 index 00000000..49f50057 --- /dev/null +++ b/environments/magento2/2.4.5/init.env @@ -0,0 +1,37 @@ + +WARDEN_DB=1 +WARDEN_ELASTICSEARCH=0 +WARDEN_OPENSEARCH=1 +WARDEN_ELASTICHQ=0 +WARDEN_VARNISH=1 +WARDEN_RABBITMQ=1 +WARDEN_REDIS=1 + +OPENSEARCH_VERSION=1.2 +MYSQL_DISTRIBUTION=mariadb +MYSQL_DISTRIBUTION_VERSION=10.4 +NODE_VERSION=12 +COMPOSER_VERSION=2.2 +PHP_VERSION=8.1 +PHP_XDEBUG_3=1 +RABBITMQ_VERSION=3.9 +REDIS_VERSION=6.2 +VARNISH_VERSION=7.0 + +WARDEN_SYNC_IGNORE= + +WARDEN_ALLURE=0 +WARDEN_SELENIUM=0 +WARDEN_SELENIUM_DEBUG=0 +WARDEN_BLACKFIRE=0 +WARDEN_SPLIT_SALES=0 +WARDEN_SPLIT_CHECKOUT=0 +WARDEN_TEST_DB=1 +WARDEN_MAGEPACK=0 +MAGEPACK_VERSION=2.11 + +BLACKFIRE_CLIENT_ID= +BLACKFIRE_CLIENT_TOKEN= +BLACKFIRE_SERVER_ID= +BLACKFIRE_SERVER_TOKEN= + diff --git a/environments/magento2/magento2.base.yml b/environments/magento2/2.4.5/magento2.base.yml similarity index 100% rename from environments/magento2/magento2.base.yml rename to environments/magento2/2.4.5/magento2.base.yml diff --git a/environments/magento2/magento2.blackfire.darwin.yml b/environments/magento2/2.4.5/magento2.blackfire.darwin.yml similarity index 100% rename from environments/magento2/magento2.blackfire.darwin.yml rename to environments/magento2/2.4.5/magento2.blackfire.darwin.yml diff --git a/environments/magento2/magento2.darwin.yml b/environments/magento2/2.4.5/magento2.darwin.yml similarity index 100% rename from environments/magento2/magento2.darwin.yml rename to environments/magento2/2.4.5/magento2.darwin.yml diff --git a/environments/magento2/magento2.magepack.base.yml b/environments/magento2/2.4.5/magento2.magepack.base.yml similarity index 100% rename from environments/magento2/magento2.magepack.base.yml rename to environments/magento2/2.4.5/magento2.magepack.base.yml diff --git a/environments/magento2/magento2.magepack.darwin.yml b/environments/magento2/2.4.5/magento2.magepack.darwin.yml similarity index 100% rename from environments/magento2/magento2.magepack.darwin.yml rename to environments/magento2/2.4.5/magento2.magepack.darwin.yml diff --git a/environments/magento2/magento2.magepack.linux.yml b/environments/magento2/2.4.5/magento2.magepack.linux.yml similarity index 100% rename from environments/magento2/magento2.magepack.linux.yml rename to environments/magento2/2.4.5/magento2.magepack.linux.yml diff --git a/environments/magento2/magento2.mutagen.yml b/environments/magento2/2.4.5/magento2.mutagen.yml similarity index 100% rename from environments/magento2/magento2.mutagen.yml rename to environments/magento2/2.4.5/magento2.mutagen.yml diff --git a/environments/magento2/magento2.splitdb.checkout.base.yml b/environments/magento2/2.4.5/magento2.splitdb.checkout.base.yml similarity index 100% rename from environments/magento2/magento2.splitdb.checkout.base.yml rename to environments/magento2/2.4.5/magento2.splitdb.checkout.base.yml diff --git a/environments/magento2/magento2.splitdb.sales.base.yml b/environments/magento2/2.4.5/magento2.splitdb.sales.base.yml similarity index 100% rename from environments/magento2/magento2.splitdb.sales.base.yml rename to environments/magento2/2.4.5/magento2.splitdb.sales.base.yml diff --git a/environments/magento2/magento2.tests.base.yml b/environments/magento2/2.4.5/magento2.tests.base.yml similarity index 100% rename from environments/magento2/magento2.tests.base.yml rename to environments/magento2/2.4.5/magento2.tests.base.yml diff --git a/environments/magento2/2.4.6/db.base.yml b/environments/magento2/2.4.6/db.base.yml new file mode 100644 index 00000000..574ea1f3 --- /dev/null +++ b/environments/magento2/2.4.6/db.base.yml @@ -0,0 +1,11 @@ +services: + db: + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on diff --git a/environments/magento2/2.4.6/init.env b/environments/magento2/2.4.6/init.env new file mode 100644 index 00000000..af0d931d --- /dev/null +++ b/environments/magento2/2.4.6/init.env @@ -0,0 +1,37 @@ + +WARDEN_DB=1 +WARDEN_ELASTICSEARCH=0 +WARDEN_OPENSEARCH=1 +WARDEN_ELASTICHQ=0 +WARDEN_VARNISH=1 +WARDEN_RABBITMQ=1 +WARDEN_REDIS=1 + +OPENSEARCH_VERSION=2.5 +MYSQL_DISTRIBUTION=mariadb +MYSQL_DISTRIBUTION_VERSION=10.6 +NODE_VERSION=12 +COMPOSER_VERSION=2.2 +PHP_VERSION=8.2 +PHP_XDEBUG_3=1 +RABBITMQ_VERSION=3.11 +REDIS_VERSION=7.0 +VARNISH_VERSION=7.1 + +WARDEN_SYNC_IGNORE= + +WARDEN_ALLURE=0 +WARDEN_SELENIUM=0 +WARDEN_SELENIUM_DEBUG=0 +WARDEN_BLACKFIRE=0 +WARDEN_SPLIT_SALES=0 +WARDEN_SPLIT_CHECKOUT=0 +WARDEN_TEST_DB=1 +WARDEN_MAGEPACK=0 +MAGEPACK_VERSION=2.11 + +BLACKFIRE_CLIENT_ID= +BLACKFIRE_CLIENT_TOKEN= +BLACKFIRE_SERVER_ID= +BLACKFIRE_SERVER_TOKEN= + diff --git a/environments/magento2/2.4.6/magento2.base.yml b/environments/magento2/2.4.6/magento2.base.yml new file mode 100644 index 00000000..17662506 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.base.yml @@ -0,0 +1,23 @@ +services: + nginx: + environment: + - NGINX_PUBLIC=/pub + - NGINX_TEMPLATE=magento2.conf + + php-fpm: + labels: + - traefik.enable=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.tls=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.priority=3 + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.rule= + (HostRegexp(`{subdomain:.+}.${TRAEFIK_DOMAIN}`) || Host(`${TRAEFIK_DOMAIN}`)) + && (Path(`/livereload.js`) || Path(`/livereload`)) + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.service=${WARDEN_ENV_NAME}-livereload + - traefik.http.services.${WARDEN_ENV_NAME}-livereload.loadbalancer.server.port=35729 + - traefik.docker.network=${WARDEN_ENV_NAME}_default + environment: + - MAGE_DEBUG_SHOW_ARGS=1 + + php-debug: + environment: + - MAGE_DEBUG_SHOW_ARGS=1 diff --git a/environments/magento2/2.4.6/magento2.blackfire.darwin.yml b/environments/magento2/2.4.6/magento2.blackfire.darwin.yml new file mode 100644 index 00000000..cdd72e74 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.blackfire.darwin.yml @@ -0,0 +1,10 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + php-blackfire: { volumes: *volumes, environment: *environment } diff --git a/environments/magento2/2.4.6/magento2.darwin.yml b/environments/magento2/2.4.6/magento2.darwin.yml new file mode 100644 index 00000000..5a320b88 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.darwin.yml @@ -0,0 +1,15 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + nginx: { volumes: *volumes } + php-fpm: { volumes: *volumes, environment: *environment } + php-debug: { volumes: *volumes, environment: *environment } + +volumes: + appdata: diff --git a/environments/magento2/2.4.6/magento2.magepack.base.yml b/environments/magento2/2.4.6/magento2.magepack.base.yml new file mode 100644 index 00000000..78c62e3d --- /dev/null +++ b/environments/magento2/2.4.6/magento2.magepack.base.yml @@ -0,0 +1,12 @@ +services: + magepack: + hostname: "${WARDEN_ENV_NAME}-magepack" + image: ${WARDEN_IMAGE_REPOSITORY}/magepack:${MAGEPACK_VERSION:-2.3} + environment: + - TRAEFIK_DOMAIN + - TRAEFIK_SUBDOMAIN + extra_hosts: + - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + - ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + depends_on: + - php-fpm diff --git a/environments/magento2/2.4.6/magento2.magepack.darwin.yml b/environments/magento2/2.4.6/magento2.magepack.darwin.yml new file mode 100644 index 00000000..11054861 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.magepack.darwin.yml @@ -0,0 +1,7 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/2.4.6/magento2.magepack.linux.yml b/environments/magento2/2.4.6/magento2.magepack.linux.yml new file mode 100644 index 00000000..7c623e85 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.magepack.linux.yml @@ -0,0 +1,6 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/2.4.6/magento2.mutagen.yml b/environments/magento2/2.4.6/magento2.mutagen.yml new file mode 100644 index 00000000..9de33738 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.mutagen.yml @@ -0,0 +1,30 @@ +--- +sync: + defaults: + mode: two-way-resolved + watch: + pollingInterval: 10 + ignore: + vcs: false + paths: + # Root .git folder + - "/.git/" + + # System files + - ".DS_Store" + - "._*" + + # Vim files + - "*~" + - "*.sw[a-p]" + + # Magento files + - "/pub/media" + - "/pub/static/**" + - "!/pub/static/.htaccess" + - "/var/**" + - "!/var/.htaccess" + + permissions: + defaultFileMode: "0644" + defaultDirectoryMode: "0755" diff --git a/environments/magento2/2.4.6/magento2.splitdb.checkout.base.yml b/environments/magento2/2.4.6/magento2.splitdb.checkout.base.yml new file mode 100644 index 00000000..babd7d14 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.splitdb.checkout.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - checkoutdb + + php-debug: + depends_on: + - checkoutdb + + checkoutdb: + hostname: "${WARDEN_ENV_NAME}-checkoutdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - checkoutdbdata:/var/lib/mysql + +volumes: + checkoutdbdata: diff --git a/environments/magento2/2.4.6/magento2.splitdb.sales.base.yml b/environments/magento2/2.4.6/magento2.splitdb.sales.base.yml new file mode 100644 index 00000000..6fc463a7 --- /dev/null +++ b/environments/magento2/2.4.6/magento2.splitdb.sales.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - salesdb + + php-debug: + depends_on: + - salesdb + + salesdb: + hostname: "${WARDEN_ENV_NAME}-salesdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - salesdbdata:/var/lib/mysql + +volumes: + salesdbdata: diff --git a/environments/magento2/2.4.6/magento2.tests.base.yml b/environments/magento2/2.4.6/magento2.tests.base.yml new file mode 100644 index 00000000..a1704dda --- /dev/null +++ b/environments/magento2/2.4.6/magento2.tests.base.yml @@ -0,0 +1,21 @@ +services: + tmp-mysql: + hostname: "${WARDEN_ENV_NAME}-mysql" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=magento_integration_tests + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on + volumes: + - tmp-dbdata:/var/lib/mysql + +volumes: + tmp-dbdata: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/environments/magento2/2.4.7/db.base.yml b/environments/magento2/2.4.7/db.base.yml new file mode 100644 index 00000000..574ea1f3 --- /dev/null +++ b/environments/magento2/2.4.7/db.base.yml @@ -0,0 +1,11 @@ +services: + db: + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on diff --git a/environments/magento2/2.4.7/init.env b/environments/magento2/2.4.7/init.env new file mode 100644 index 00000000..45b0ea32 --- /dev/null +++ b/environments/magento2/2.4.7/init.env @@ -0,0 +1,37 @@ + +WARDEN_DB=1 +WARDEN_ELASTICSEARCH=0 +WARDEN_OPENSEARCH=1 +WARDEN_ELASTICHQ=0 +WARDEN_VARNISH=1 +WARDEN_RABBITMQ=1 +WARDEN_REDIS=1 + +OPENSEARCH_VERSION=2.12 +MYSQL_DISTRIBUTION=mariadb +MYSQL_DISTRIBUTION_VERSION=10.6 +NODE_VERSION=12 +COMPOSER_VERSION=2.7 +PHP_VERSION=8.3 +PHP_XDEBUG_3=1 +RABBITMQ_VERSION=3.13 +REDIS_VERSION=7.2 +VARNISH_VERSION=7.5 + +WARDEN_SYNC_IGNORE= + +WARDEN_ALLURE=0 +WARDEN_SELENIUM=0 +WARDEN_SELENIUM_DEBUG=0 +WARDEN_BLACKFIRE=0 +WARDEN_SPLIT_SALES=0 +WARDEN_SPLIT_CHECKOUT=0 +WARDEN_TEST_DB=1 +WARDEN_MAGEPACK=0 +MAGEPACK_VERSION=2.11 + +BLACKFIRE_CLIENT_ID= +BLACKFIRE_CLIENT_TOKEN= +BLACKFIRE_SERVER_ID= +BLACKFIRE_SERVER_TOKEN= + diff --git a/environments/magento2/2.4.7/magento2.base.yml b/environments/magento2/2.4.7/magento2.base.yml new file mode 100644 index 00000000..17662506 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.base.yml @@ -0,0 +1,23 @@ +services: + nginx: + environment: + - NGINX_PUBLIC=/pub + - NGINX_TEMPLATE=magento2.conf + + php-fpm: + labels: + - traefik.enable=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.tls=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.priority=3 + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.rule= + (HostRegexp(`{subdomain:.+}.${TRAEFIK_DOMAIN}`) || Host(`${TRAEFIK_DOMAIN}`)) + && (Path(`/livereload.js`) || Path(`/livereload`)) + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.service=${WARDEN_ENV_NAME}-livereload + - traefik.http.services.${WARDEN_ENV_NAME}-livereload.loadbalancer.server.port=35729 + - traefik.docker.network=${WARDEN_ENV_NAME}_default + environment: + - MAGE_DEBUG_SHOW_ARGS=1 + + php-debug: + environment: + - MAGE_DEBUG_SHOW_ARGS=1 diff --git a/environments/magento2/2.4.7/magento2.blackfire.darwin.yml b/environments/magento2/2.4.7/magento2.blackfire.darwin.yml new file mode 100644 index 00000000..cdd72e74 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.blackfire.darwin.yml @@ -0,0 +1,10 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + php-blackfire: { volumes: *volumes, environment: *environment } diff --git a/environments/magento2/2.4.7/magento2.darwin.yml b/environments/magento2/2.4.7/magento2.darwin.yml new file mode 100644 index 00000000..5a320b88 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.darwin.yml @@ -0,0 +1,15 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + nginx: { volumes: *volumes } + php-fpm: { volumes: *volumes, environment: *environment } + php-debug: { volumes: *volumes, environment: *environment } + +volumes: + appdata: diff --git a/environments/magento2/2.4.7/magento2.magepack.base.yml b/environments/magento2/2.4.7/magento2.magepack.base.yml new file mode 100644 index 00000000..78c62e3d --- /dev/null +++ b/environments/magento2/2.4.7/magento2.magepack.base.yml @@ -0,0 +1,12 @@ +services: + magepack: + hostname: "${WARDEN_ENV_NAME}-magepack" + image: ${WARDEN_IMAGE_REPOSITORY}/magepack:${MAGEPACK_VERSION:-2.3} + environment: + - TRAEFIK_DOMAIN + - TRAEFIK_SUBDOMAIN + extra_hosts: + - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + - ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + depends_on: + - php-fpm diff --git a/environments/magento2/2.4.7/magento2.magepack.darwin.yml b/environments/magento2/2.4.7/magento2.magepack.darwin.yml new file mode 100644 index 00000000..11054861 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.magepack.darwin.yml @@ -0,0 +1,7 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/2.4.7/magento2.magepack.linux.yml b/environments/magento2/2.4.7/magento2.magepack.linux.yml new file mode 100644 index 00000000..7c623e85 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.magepack.linux.yml @@ -0,0 +1,6 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/2.4.7/magento2.mutagen.yml b/environments/magento2/2.4.7/magento2.mutagen.yml new file mode 100644 index 00000000..9de33738 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.mutagen.yml @@ -0,0 +1,30 @@ +--- +sync: + defaults: + mode: two-way-resolved + watch: + pollingInterval: 10 + ignore: + vcs: false + paths: + # Root .git folder + - "/.git/" + + # System files + - ".DS_Store" + - "._*" + + # Vim files + - "*~" + - "*.sw[a-p]" + + # Magento files + - "/pub/media" + - "/pub/static/**" + - "!/pub/static/.htaccess" + - "/var/**" + - "!/var/.htaccess" + + permissions: + defaultFileMode: "0644" + defaultDirectoryMode: "0755" diff --git a/environments/magento2/2.4.7/magento2.splitdb.checkout.base.yml b/environments/magento2/2.4.7/magento2.splitdb.checkout.base.yml new file mode 100644 index 00000000..babd7d14 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.splitdb.checkout.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - checkoutdb + + php-debug: + depends_on: + - checkoutdb + + checkoutdb: + hostname: "${WARDEN_ENV_NAME}-checkoutdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - checkoutdbdata:/var/lib/mysql + +volumes: + checkoutdbdata: diff --git a/environments/magento2/2.4.7/magento2.splitdb.sales.base.yml b/environments/magento2/2.4.7/magento2.splitdb.sales.base.yml new file mode 100644 index 00000000..6fc463a7 --- /dev/null +++ b/environments/magento2/2.4.7/magento2.splitdb.sales.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - salesdb + + php-debug: + depends_on: + - salesdb + + salesdb: + hostname: "${WARDEN_ENV_NAME}-salesdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - salesdbdata:/var/lib/mysql + +volumes: + salesdbdata: diff --git a/environments/magento2/2.4.7/magento2.tests.base.yml b/environments/magento2/2.4.7/magento2.tests.base.yml new file mode 100644 index 00000000..a1704dda --- /dev/null +++ b/environments/magento2/2.4.7/magento2.tests.base.yml @@ -0,0 +1,21 @@ +services: + tmp-mysql: + hostname: "${WARDEN_ENV_NAME}-mysql" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=magento_integration_tests + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on + volumes: + - tmp-dbdata:/var/lib/mysql + +volumes: + tmp-dbdata: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/environments/magento2/default/db.base.yml b/environments/magento2/default/db.base.yml new file mode 100644 index 00000000..574ea1f3 --- /dev/null +++ b/environments/magento2/default/db.base.yml @@ -0,0 +1,11 @@ +services: + db: + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on diff --git a/environments/magento2/init.env b/environments/magento2/default/init.env similarity index 100% rename from environments/magento2/init.env rename to environments/magento2/default/init.env diff --git a/environments/magento2/default/magento2.base.yml b/environments/magento2/default/magento2.base.yml new file mode 100644 index 00000000..17662506 --- /dev/null +++ b/environments/magento2/default/magento2.base.yml @@ -0,0 +1,23 @@ +services: + nginx: + environment: + - NGINX_PUBLIC=/pub + - NGINX_TEMPLATE=magento2.conf + + php-fpm: + labels: + - traefik.enable=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.tls=true + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.priority=3 + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.rule= + (HostRegexp(`{subdomain:.+}.${TRAEFIK_DOMAIN}`) || Host(`${TRAEFIK_DOMAIN}`)) + && (Path(`/livereload.js`) || Path(`/livereload`)) + - traefik.http.routers.${WARDEN_ENV_NAME}-livereload.service=${WARDEN_ENV_NAME}-livereload + - traefik.http.services.${WARDEN_ENV_NAME}-livereload.loadbalancer.server.port=35729 + - traefik.docker.network=${WARDEN_ENV_NAME}_default + environment: + - MAGE_DEBUG_SHOW_ARGS=1 + + php-debug: + environment: + - MAGE_DEBUG_SHOW_ARGS=1 diff --git a/environments/magento2/default/magento2.blackfire.darwin.yml b/environments/magento2/default/magento2.blackfire.darwin.yml new file mode 100644 index 00000000..cdd72e74 --- /dev/null +++ b/environments/magento2/default/magento2.blackfire.darwin.yml @@ -0,0 +1,10 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + php-blackfire: { volumes: *volumes, environment: *environment } diff --git a/environments/magento2/default/magento2.darwin.yml b/environments/magento2/default/magento2.darwin.yml new file mode 100644 index 00000000..5a320b88 --- /dev/null +++ b/environments/magento2/default/magento2.darwin.yml @@ -0,0 +1,15 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +x-environment: &environment + - CHOWN_DIR_LIST=pub/media ${CHOWN_DIR_LIST:-} + +services: + nginx: { volumes: *volumes } + php-fpm: { volumes: *volumes, environment: *environment } + php-debug: { volumes: *volumes, environment: *environment } + +volumes: + appdata: diff --git a/environments/magento2/default/magento2.magepack.base.yml b/environments/magento2/default/magento2.magepack.base.yml new file mode 100644 index 00000000..78c62e3d --- /dev/null +++ b/environments/magento2/default/magento2.magepack.base.yml @@ -0,0 +1,12 @@ +services: + magepack: + hostname: "${WARDEN_ENV_NAME}-magepack" + image: ${WARDEN_IMAGE_REPOSITORY}/magepack:${MAGEPACK_VERSION:-2.3} + environment: + - TRAEFIK_DOMAIN + - TRAEFIK_SUBDOMAIN + extra_hosts: + - ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + - ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0} + depends_on: + - php-fpm diff --git a/environments/magento2/default/magento2.magepack.darwin.yml b/environments/magento2/default/magento2.magepack.darwin.yml new file mode 100644 index 00000000..11054861 --- /dev/null +++ b/environments/magento2/default/magento2.magepack.darwin.yml @@ -0,0 +1,7 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/pub/media:/var/www/html/pub/media:cached + - appdata:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/default/magento2.magepack.linux.yml b/environments/magento2/default/magento2.magepack.linux.yml new file mode 100644 index 00000000..7c623e85 --- /dev/null +++ b/environments/magento2/default/magento2.magepack.linux.yml @@ -0,0 +1,6 @@ + +x-volumes: &volumes + - .${WARDEN_WEB_ROOT:-}/:/var/www/html + +services: + magepack: { volumes: *volumes } diff --git a/environments/magento2/default/magento2.mutagen.yml b/environments/magento2/default/magento2.mutagen.yml new file mode 100644 index 00000000..9de33738 --- /dev/null +++ b/environments/magento2/default/magento2.mutagen.yml @@ -0,0 +1,30 @@ +--- +sync: + defaults: + mode: two-way-resolved + watch: + pollingInterval: 10 + ignore: + vcs: false + paths: + # Root .git folder + - "/.git/" + + # System files + - ".DS_Store" + - "._*" + + # Vim files + - "*~" + - "*.sw[a-p]" + + # Magento files + - "/pub/media" + - "/pub/static/**" + - "!/pub/static/.htaccess" + - "/var/**" + - "!/var/.htaccess" + + permissions: + defaultFileMode: "0644" + defaultDirectoryMode: "0755" diff --git a/environments/magento2/default/magento2.splitdb.checkout.base.yml b/environments/magento2/default/magento2.splitdb.checkout.base.yml new file mode 100644 index 00000000..babd7d14 --- /dev/null +++ b/environments/magento2/default/magento2.splitdb.checkout.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - checkoutdb + + php-debug: + depends_on: + - checkoutdb + + checkoutdb: + hostname: "${WARDEN_ENV_NAME}-checkoutdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - checkoutdbdata:/var/lib/mysql + +volumes: + checkoutdbdata: diff --git a/environments/magento2/default/magento2.splitdb.sales.base.yml b/environments/magento2/default/magento2.splitdb.sales.base.yml new file mode 100644 index 00000000..6fc463a7 --- /dev/null +++ b/environments/magento2/default/magento2.splitdb.sales.base.yml @@ -0,0 +1,25 @@ +services: + php-fpm: + depends_on: + - salesdb + + php-debug: + depends_on: + - salesdb + + salesdb: + hostname: "${WARDEN_ENV_NAME}-salesdb" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=${MYSQL_DATABASE:-magento} + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + volumes: + - salesdbdata:/var/lib/mysql + +volumes: + salesdbdata: diff --git a/environments/magento2/default/magento2.tests.base.yml b/environments/magento2/default/magento2.tests.base.yml new file mode 100644 index 00000000..a1704dda --- /dev/null +++ b/environments/magento2/default/magento2.tests.base.yml @@ -0,0 +1,21 @@ +services: + tmp-mysql: + hostname: "${WARDEN_ENV_NAME}-mysql" + image: ${WARDEN_IMAGE_REPOSITORY}/${MYSQL_DISTRIBUTION:-mariadb}:${MYSQL_DISTRIBUTION_VERSION:-${MARIADB_VERSION:-10.4}} + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-magento} + - MYSQL_DATABASE=magento_integration_tests + - MYSQL_USER=${MYSQL_USER:-magento} + - MYSQL_PASSWORD=${MYSQL_PASSWORD:-magento} + command: + - mysqld + - --max_allowed_packet=1024M + - --explicit_defaults_for_timestamp=on + volumes: + - tmp-dbdata:/var/lib/mysql + +volumes: + tmp-dbdata: + driver_opts: + type: tmpfs + device: tmpfs diff --git a/environments/shopware/db.base.yml b/environments/shopware/default/db.base.yml similarity index 100% rename from environments/shopware/db.base.yml rename to environments/shopware/default/db.base.yml diff --git a/environments/shopware/init.env b/environments/shopware/default/init.env similarity index 100% rename from environments/shopware/init.env rename to environments/shopware/default/init.env diff --git a/environments/shopware/shopware.base.yml b/environments/shopware/default/shopware.base.yml similarity index 100% rename from environments/shopware/shopware.base.yml rename to environments/shopware/default/shopware.base.yml diff --git a/environments/shopware/shopware.darwin.yml b/environments/shopware/default/shopware.darwin.yml similarity index 100% rename from environments/shopware/shopware.darwin.yml rename to environments/shopware/default/shopware.darwin.yml diff --git a/environments/shopware/shopware.mutagen.yml b/environments/shopware/default/shopware.mutagen.yml similarity index 100% rename from environments/shopware/shopware.mutagen.yml rename to environments/shopware/default/shopware.mutagen.yml diff --git a/environments/symfony/db.base.yml b/environments/symfony/default/db.base.yml similarity index 100% rename from environments/symfony/db.base.yml rename to environments/symfony/default/db.base.yml diff --git a/environments/symfony/init.env b/environments/symfony/default/init.env similarity index 100% rename from environments/symfony/init.env rename to environments/symfony/default/init.env diff --git a/environments/symfony/symfony.base.yml b/environments/symfony/default/symfony.base.yml similarity index 100% rename from environments/symfony/symfony.base.yml rename to environments/symfony/default/symfony.base.yml diff --git a/environments/wordpress/db.base.yml b/environments/wordpress/default/db.base.yml similarity index 100% rename from environments/wordpress/db.base.yml rename to environments/wordpress/default/db.base.yml diff --git a/environments/wordpress/init.env b/environments/wordpress/default/init.env similarity index 100% rename from environments/wordpress/init.env rename to environments/wordpress/default/init.env diff --git a/environments/wordpress/wordpress.base.yml b/environments/wordpress/default/wordpress.base.yml similarity index 100% rename from environments/wordpress/wordpress.base.yml rename to environments/wordpress/default/wordpress.base.yml diff --git a/utils/env.sh b/utils/env.sh index 598021d6..17fe9e2c 100644 --- a/utils/env.sh +++ b/utils/env.sh @@ -6,7 +6,8 @@ function locateEnvPath () { while [[ "${WARDEN_ENV_PATH}" != "/" ]]; do if [[ -f "${WARDEN_ENV_PATH}/.env" ]] \ && grep "^WARDEN_ENV_NAME" "${WARDEN_ENV_PATH}/.env" >/dev/null \ - && grep "^WARDEN_ENV_TYPE" "${WARDEN_ENV_PATH}/.env" >/dev/null + && grep "^WARDEN_ENV_TYPE" "${WARDEN_ENV_PATH}/.env" >/dev/null \ + && grep "^WARDEN_ENV_VERSION" "${WARDEN_ENV_PATH}/.env" >/dev/null then break fi @@ -39,6 +40,7 @@ function loadEnvConfig () { WARDEN_ENV_NAME="${WARDEN_ENV_NAME:-}" WARDEN_ENV_TYPE="${WARDEN_ENV_TYPE:-}" + WARDEN_ENV_VERSION="${WARDEN_ENV_VERSION:-default}" WARDEN_ENV_SUBT="" case "${OSTYPE:-undefined}" in @@ -62,11 +64,12 @@ function renderEnvNetworkName() { function fetchEnvInitFile () { local envInitPath="" + local envTypeVersion="${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}" for ENV_INIT_PATH in \ - "${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/init.env" \ - "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/init.env" \ - "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/init.env" + "${WARDEN_DIR}/environments/${envTypeVersion}/init.env" \ + "${WARDEN_HOME_DIR}/environments/${envTypeVersion}/init.env" \ + "${WARDEN_ENV_PATH}/.warden/environments/${envTypeVersion}/init.env" do if [[ -f "${ENV_INIT_PATH}" ]]; then envInitPath="${ENV_INIT_PATH}" @@ -77,14 +80,14 @@ function fetchEnvInitFile () { } function fetchValidEnvTypes () { - local lsPaths="${WARDEN_DIR}/environments/"*/*".base.yml" + local lsPaths="${WARDEN_DIR}/environments/"*/*/*".base.yml" if [[ -d "${WARDEN_HOME_DIR}/environments" ]]; then - lsPaths="${lsPaths} ${WARDEN_HOME_DIR}/environments/"*/*".base.yml" + lsPaths="${lsPaths} ${WARDEN_HOME_DIR}/environments/"*/*/*".base.yml" fi if [[ -d "${WARDEN_ENV_PATH}/.warden/environments" ]]; then - lsPaths="${lsPaths} ${WARDEN_ENV_PATH}/.warden/environments/"*/*".base.yml" + lsPaths="${lsPaths} ${WARDEN_ENV_PATH}/.warden/environments/"*/*/*".base.yml" fi echo $( @@ -97,19 +100,21 @@ function fetchValidEnvTypes () { } function assertValidEnvType () { - if [[ -f "${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.base.yml" ]]; then + local envTypeVersion="${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}/${WARDEN_ENV_TYPE}" + + if [[ -f "${WARDEN_DIR}/environments/${envTypeVersion}.base.yml" ]]; then return 0 fi - if [[ -f "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.base.yml" ]]; then + if [[ -f "${WARDEN_HOME_DIR}/environments/${envTypeVersion}.base.yml" ]]; then return 0 fi - if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${WARDEN_ENV_TYPE}.base.yml" ]]; then + if [[ -f "${WARDEN_ENV_PATH}/.warden/environments/${envTypeVersion}.base.yml" ]]; then return 0 fi - >&2 echo -e "\033[31mInvalid environment type \"${WARDEN_ENV_TYPE}\" specified.\033[0m" + >&2 echo -e "\033[31mInvalid environment type \"${WARDEN_ENV_TYPE}\" and version \"${WARDEN_ENV_VERSION}\" combination specified, base.yml definitions not found.\033[0m" return 1 } @@ -117,20 +122,21 @@ function assertValidEnvType () { function appendEnvPartialIfExists () { local PARTIAL_NAME="${1}" local PARTIAL_PATH="" + local envTypeVersion="${WARDEN_ENV_TYPE}/${WARDEN_ENV_VERSION}" for PARTIAL_PATH in \ "${WARDEN_DIR}/environments/includes/${PARTIAL_NAME}.base.yml" \ "${WARDEN_DIR}/environments/includes/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ - "${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.base.yml" \ - "${WARDEN_DIR}/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ + "${WARDEN_DIR}/environments/${envTypeVersion}/${PARTIAL_NAME}.base.yml" \ + "${WARDEN_DIR}/environments/${envTypeVersion}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ "${WARDEN_HOME_DIR}/environments/includes/${PARTIAL_NAME}.base.yml" \ "${WARDEN_HOME_DIR}/environments/includes/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ - "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.base.yml" \ - "${WARDEN_HOME_DIR}/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ + "${WARDEN_HOME_DIR}/environments/${envTypeVersion}/${PARTIAL_NAME}.base.yml" \ + "${WARDEN_HOME_DIR}/environments/${envTypeVersion}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ "${WARDEN_ENV_PATH}/.warden/environments/includes/${PARTIAL_NAME}.base.yml" \ "${WARDEN_ENV_PATH}/.warden/environments/includes/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" \ - "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.base.yml" \ - "${WARDEN_ENV_PATH}/.warden/environments/${WARDEN_ENV_TYPE}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" + "${WARDEN_ENV_PATH}/.warden/environments/${envTypeVersion}/${PARTIAL_NAME}.base.yml" \ + "${WARDEN_ENV_PATH}/.warden/environments/${envTypeVersion}/${PARTIAL_NAME}.${WARDEN_ENV_SUBT}.yml" do if [[ -f "${PARTIAL_PATH}" ]]; then DOCKER_COMPOSE_ARGS+=("-f" "${PARTIAL_PATH}")