diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0a9657a71..b2bcfd3807 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,12 @@ jobs: fail-fast: false matrix: php-version: [ - '8.0', + '8.0', + '8.1' ] env: - APPLICATION_ENV: devtest + APPLICATION_ENV: ci.mysql APPLICATION_STORE: DE PROJECT: suite @@ -46,7 +47,7 @@ jobs: uses: elastic/elastic-github-actions/elasticsearch@master with: stack-version: 7.10.0 - port: 10005 + port: 9200 - uses: actions/setup-node@v1 with: @@ -148,11 +149,88 @@ jobs: run: vendor/bin/phpmd src/ text vendor/spryker/architecture-sniffer/src/ruleset.xml --minimumpriority 2 - name: Run PHPStan - run: vendor/bin/phpstan analyze -l 5 -c phpstan.neon src/ --debug + run: vendor/bin/phpstan analyze -l 5 -c phpstan.neon src/ - name: Run Security check run: vendor/bin/console security:check + php-81-mariadb-glue-alpine: + name: "PHP 8.1 / MariaDB / Glue / Alpine" + runs-on: ubuntu-20.04 + env: + PROGRESS_TYPE: plain + SPRYKER_PLATFORM_IMAGE: spryker/php:8.1 + TRAVIS: 1 + + steps: + - uses: actions/checkout@v2 + + - name: Install apt-packages + run: | + sudo apt-get install apache2-utils + - name: Install docker-compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Run docker + run: | + git clone https://github.com/spryker/docker-sdk.git ./docker + docker/sdk boot deploy.ci.api.mariadb.yml -v + docker/sdk up -t -v + docker/sdk testing codecept fixtures + docker/sdk testing console queue:worker:start --stop-when-empty + docker/sdk testing codecept run -c codeception.api.yml + + php-81-mariadb-acceptance-alpine: + name: "PHP 8.1 / MariaDB / Acceptance / Alpine" + runs-on: ubuntu-20.04 + env: + PROGRESS_TYPE: plain + SPRYKER_PLATFORM_IMAGE: spryker/php:8.1 + TRAVIS: 1 + + steps: + - uses: actions/checkout@v2 + + - name: Install apt-packages + run: | + sudo apt-get install apache2-utils + - name: Install docker-compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Run docker + run: | + git clone https://github.com/spryker/docker-sdk.git ./docker + docker/sdk boot -v deploy.ci.acceptance.mariadb.yml + docker/sdk up -t + docker/sdk testing console queue:worker:start --stop-when-empty + docker/sdk testing codecept run -c codeception.acceptance.yml + + php-81-mariadb-functional-alpine: + name: "PHP 8.1 / MariaDB / Functional / Alpine" + runs-on: ubuntu-20.04 + env: + PROGRESS_TYPE: plain + SPRYKER_PLATFORM_IMAGE: spryker/php:8.1 + TRAVIS: 1 + + steps: + - uses: actions/checkout@v2 + + - name: Install apt-packages + run: | + sudo apt-get install apache2-utils + - name: Install docker-compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Run docker + run: | + git clone https://github.com/spryker/docker-sdk.git ./docker + docker/sdk boot deploy.ci.functional.mariadb.yml -v + docker/sdk up -t -v + docker/sdk testing codecept run -c codeception.functional.yml php-80-mariadb-glue-alpine: name: "PHP 8.0 / MariaDB / Glue / Alpine" runs-on: ubuntu-20.04 @@ -341,3 +419,105 @@ jobs: - run: docker run -t --rm -e SPRYKER_NGINX_CGI_HOST_YVES_EU=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_EU=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_EU=localhost -e SPRYKER_NGINX_CGI_HOST_YVES_US=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_US=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_US=localhost -e ALLOWED_IP=127.0.0.1 spryker_b2c_frontend:1.0-frontend nginx -t - run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Yves/assets/myhash - run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Zed/assets/ + + docker-alpine-php-8-0-mariadb-robot: + name: "Docker / Alpine / PHP 8.0 / MariaDB / Robot" + runs-on: ubuntu-20.04 + env: + PROGRESS_TYPE: plain + SPRYKER_PLATFORM_IMAGE: spryker/php:8.0 + TRAVIS: 1 + ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1 + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install packages + run: | + sudo apt-get install apache2-utils + sudo apt install awscli -q + python3 -m pip install --upgrade pip + python3 -m pip install -U robotframework + python3 -m pip install -U robotframework-requests + python3 -m pip install -U robotframework-jsonlibrary + python3 -m pip install -U robotframework-databaselibrary + python3 -m pip install PyMySQL + - name: Install docker-compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Install Robot tests + run: | + git clone https://github.com/spryker/robotframework-suite-tests.git --single-branch --branch master robotframework-tests + - name: Install Project + continue-on-error: true + run: | + git clone https://github.com/spryker/docker-sdk.git ./docker + docker/sdk boot -v deploy.ci.acceptance.mariadb.yml + docker/sdk up -t -v + docker/sdk testing console queue:worker:start --stop-when-empty + sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts" + - name: Run Tests + run: | + cd robotframework-tests + robot -v env:api_b2c --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.b2c.glue . + - name: Upload artifacts + if: always() + run: | + AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp robotframework-tests/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.0MariaDBRobot/ \ + --recursive \ + --expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')" + + docker-alpine-php-8-1-postgresql-robot: + name: "Docker / Alpine / PHP 8.1 / PostgreSQL / Robot" + runs-on: ubuntu-20.04 + env: + PROGRESS_TYPE: plain + SPRYKER_PLATFORM_IMAGE: spryker/php:8.1 + TRAVIS: 1 + ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1 + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install packages + run: | + sudo apt-get install apache2-utils + sudo apt install awscli -q + python3 -m pip install --upgrade pip + python3 -m pip install -U robotframework + python3 -m pip install -U robotframework-requests + python3 -m pip install -U robotframework-jsonlibrary + python3 -m pip install -U robotframework-databaselibrary + python3 -m pip install psycopg2-binary + - name: Install docker-compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + - name: Install Robot tests + run: | + git clone https://github.com/spryker/robotframework-suite-tests.git --single-branch --branch master robotframework-tests + - name: Install Project + continue-on-error: true + run: | + git clone https://github.com/spryker/docker-sdk.git ./docker + docker/sdk boot -v deploy.ci.acceptance.yml + docker/sdk up -t -v + docker/sdk testing console queue:worker:start --stop-when-empty + sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts" + - name: Run Tests + run: | + cd robotframework-tests + robot -v env:api_b2c -v db_engine:psycopg2 --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.b2c.glue . + - name: Upload artifacts + if: always() + run: | + AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp robotframework-tests/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1PostgreSQLRobot/ \ + --recursive \ + --expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')" diff --git a/.gitignore b/.gitignore index fb6c93bf4f..9fe3f58bad 100644 --- a/.gitignore +++ b/.gitignore @@ -50,10 +50,6 @@ config/Yves/cache_bust.php /public/*/assets/ /public/*/dist/ -# vagrant stuff -.vagrant -Vagrantfile - # docker stuff /docker/ /.docker-sync/ diff --git a/README.md b/README.md index 491b9c6225..d057e590d4 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ You've set up your Spryker B2C Demo Shop and can access your applications. This section describes the most common issues related to the installation of the B2C Demo Shop. -For a complete troubleshooting, see [Troubleshooting Spryker in Docker issues](https://docs.spryker.com/docs/troubleshooting-spryker-in-docker-issues) or [Troubleshooting Spryker in Vagrant installation issues](https://docs.spryker.com/docs/troubleshooting-spryker-in-vagrant-installation-issues). +For a complete troubleshooting, see [Troubleshooting Spryker in Docker issues](https://docs.spryker.com/docs/troubleshooting-spryker-in-docker-issues). **when** @@ -169,12 +169,6 @@ docker/sdk up --build --assets --data For detailed installation instructions of Spryker with Docker, see [Installing Spryker with Docker](https://docs.spryker.com/docs/installing-spryker-with-docker). - -## Installation of B2C Demo Shop with Vagrant -For detailed installation instructions of Spryker with Vagrant, see [Installing with Development Virtual Machine](https://docs.spryker.com/docs/dev-getting-started#installing-spryker-with-development-virtual-machine). - - - ## Glue API reference See Glue API reference at [REST API reference](https://docs.spryker.com/docs/rest-api-reference#/rest-api-reference). diff --git a/composer.lock b/composer.lock index 678f8cdc14..9cb7c8bdc3 100644 --- a/composer.lock +++ b/composer.lock @@ -3329,16 +3329,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.17", + "version": "3.0.19", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761" + "reference": "cc181005cf548bfd8a4896383bb825d859259f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/dbc2307d5c69aeb22db136c52e91130d7f2ca761", - "reference": "dbc2307d5c69aeb22db136c52e91130d7f2ca761", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95", + "reference": "cc181005cf548bfd8a4896383bb825d859259f95", "shasum": "" }, "require": { @@ -3419,7 +3419,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.17" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.19" }, "funding": [ { @@ -3435,7 +3435,7 @@ "type": "tidelift" } ], - "time": "2022-10-24T10:51:50+00:00" + "time": "2023-03-05T17:13:09+00:00" }, { "name": "predis/predis", @@ -24793,16 +24793,16 @@ }, { "name": "spryker/gui", - "version": "3.46.0", + "version": "3.47.1", "source": { "type": "git", "url": "https://github.com/spryker/gui.git", - "reference": "780ac49b7cbb1b5db3b812f37d414ecca57907b8" + "reference": "e49ee2a564766123e54e91392ab5c007f4df8b3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spryker/gui/zipball/780ac49b7cbb1b5db3b812f37d414ecca57907b8", - "reference": "780ac49b7cbb1b5db3b812f37d414ecca57907b8", + "url": "https://api.github.com/repos/spryker/gui/zipball/e49ee2a564766123e54e91392ab5c007f4df8b3c", + "reference": "e49ee2a564766123e54e91392ab5c007f4df8b3c", "shasum": "" }, "require": { @@ -24850,9 +24850,9 @@ ], "description": "Gui module", "support": { - "source": "https://github.com/spryker/gui/tree/3.46.0" + "source": "https://github.com/spryker/gui/tree/3.47.1" }, - "time": "2022-12-12T13:39:13+00:00" + "time": "2023-01-27T13:51:52+00:00" }, { "name": "spryker/guzzle", @@ -44953,16 +44953,16 @@ }, { "name": "symfony/http-kernel", - "version": "v5.4.16", + "version": "v5.4.20", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1" + "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b432c57c5de73634b1859093c1f58e3cd84455a1", - "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aaeec341582d3c160cc9ecfa8b2419ba6c69954e", + "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e", "shasum": "" }, "require": { @@ -45045,7 +45045,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.16" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.20" }, "funding": [ { @@ -45061,7 +45061,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T18:08:58+00:00" + "time": "2023-02-01T08:18:48+00:00" }, { "name": "symfony/intl", diff --git a/config/Shared/common/config_oauth-devvm.php b/config/Shared/common/config_oauth.php similarity index 100% rename from config/Shared/common/config_oauth-devvm.php rename to config/Shared/common/config_oauth.php diff --git a/config/Shared/config_default-ci.php b/config/Shared/config_default-ci.php index b7ca79ed89..8e4bceee7c 100644 --- a/config/Shared/config_default-ci.php +++ b/config/Shared/config_default-ci.php @@ -96,7 +96,7 @@ // ------------------------------ AUTHENTICATION ------------------------------ // ---------------------------------------------------------------------------- -require 'common/config_oauth-devvm.php'; +require 'common/config_oauth.php'; // ---------------------------------------------------------------------------- // ------------------------------ SERVICES ------------------------------------ diff --git a/config/Shared/config_default-development.php b/config/Shared/config_default-development.php deleted file mode 100644 index a2e4dd6f63..0000000000 --- a/config/Shared/config_default-development.php +++ /dev/null @@ -1,220 +0,0 @@ -getAllowedStores(), Store::getInstance()->getAllowedStores()); -$yvesHost = sprintf('www.%s.%s.local', $storeLowerCase, $domain); -$zedHost = sprintf('zed.%s.%s.local', $storeLowerCase, $domain); -$glueHost = sprintf('glue.de.%s.local', $domain); -$backofficeHost = sprintf('backoffice.%s.%s.local', $storeLowerCase, $domain); -$backendApiHost = sprintf('backend-api.%s.%s.local', $storeLowerCase, $domain); -$backendGatewayHost = sprintf('backend-gateway.%s.%s.local', $storeLowerCase, $domain); - -// ---------------------------------------------------------------------------- -// ------------------------------ CODEBASE ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[KernelConstants::STORE_PREFIX] = 'DEV'; - -// >>> Debug -$config[ApplicationConstants::ENABLE_APPLICATION_DEBUG] - = $config[CalculationPageConstants::ENABLE_CART_DEBUG] - = $config[ShopApplicationConstants::ENABLE_APPLICATION_DEBUG] - = $config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] - = true; - -// >>> Dev tools -if (interface_exists(WebProfilerConstants::class)) { - $config[WebProfilerConstants::IS_WEB_PROFILER_ENABLED] = false; -} -if (interface_exists(WebProfilerWidgetConstants::class)) { - $config[WebProfilerWidgetConstants::IS_WEB_PROFILER_ENABLED] = false; -} -$config[ConsoleConstants::ENABLE_DEVELOPMENT_CONSOLE_COMMANDS] = true; -$config[DocumentationGeneratorRestApiConstants::ENABLE_REST_API_DOCUMENTATION_GENERATION] = true; - -// >>> ErrorHandler -$config[ErrorPageConstants::ENABLE_ERROR_404_STACK_TRACE] = true; -$config[ErrorHandlerConstants::DISPLAY_ERRORS] = true; -$config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class; -$config[ErrorHandlerConstants::IS_PRETTY_ERROR_HANDLER_ENABLED] = true; - -// ---------------------------------------------------------------------------- -// ------------------------------ SECURITY ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[SessionConstants::ZED_SSL_ENABLED] - = $config[SessionConstants::YVES_SSL_ENABLED] - = $config[RouterConstants::YVES_IS_SSL_ENABLED] - = $config[RouterConstants::ZED_IS_SSL_ENABLED] - = $config[HttpConstants::ZED_HTTP_STRICT_TRANSPORT_SECURITY_ENABLED] - = $config[HttpConstants::YVES_HTTP_STRICT_TRANSPORT_SECURITY_ENABLED] - = $config[ApplicationConstants::ZED_SSL_ENABLED] - = $config[ApplicationConstants::YVES_SSL_ENABLED] - = false; - -$trustedHosts - = $config[HttpConstants::ZED_TRUSTED_HOSTS] - = $config[HttpConstants::YVES_TRUSTED_HOSTS] - = [ - $zedHost, - $yvesHost, - $backofficeHost, - $backendApiHost, - $backendGatewayHost, -]; - -$config[KernelConstants::DOMAIN_WHITELIST] = array_merge($trustedHosts, $config[KernelConstants::DOMAIN_WHITELIST]); - -// ---------------------------------------------------------------------------- -// ------------------------------ AUTHENTICATION ------------------------------ -// ---------------------------------------------------------------------------- - -require 'common/config_oauth-devvm.php'; - -// ---------------------------------------------------------------------------- -// ------------------------------ SERVICES ------------------------------------ -// ---------------------------------------------------------------------------- - -require 'common/config_services-devvm.php'; -require 'common/config_logs-files.php'; - -// >>> DATABASE -$config[PropelConstants::ZED_DB_USERNAME] = 'development'; -$config[PropelConstants::ZED_DB_PASSWORD] = 'mate20mg'; -$config[PropelConstants::ZED_DB_DATABASE] = ''; // Specified in codebucket specific configs: config_default-development_*.php - -// >>> SESSION -$config[SessionConstants::ZED_SESSION_TIME_TO_LIVE] - = $config[SessionRedisConstants::ZED_SESSION_TIME_TO_LIVE] - = $config[SessionFileConstants::ZED_SESSION_TIME_TO_LIVE] = SessionConfig::SESSION_LIFETIME_1_YEAR; - -// >>> QUEUE - -$config[RabbitMqEnv::RABBITMQ_API_VIRTUAL_HOST] - = $config[RabbitMqEnv::RABBITMQ_VIRTUAL_HOST] - = sprintf('/%s_development_zed', APPLICATION_STORE); -$config[RabbitMqEnv::RABBITMQ_USERNAME] = sprintf('%s_development', APPLICATION_STORE); - -$config[RabbitMqEnv::RABBITMQ_CONNECTIONS] = array_map(static function ($storeName) { - return [ - RabbitMqEnv::RABBITMQ_CONNECTION_NAME => $storeName . '-connection', - RabbitMqEnv::RABBITMQ_HOST => 'localhost', - RabbitMqEnv::RABBITMQ_PORT => '5672', - RabbitMqEnv::RABBITMQ_PASSWORD => 'mate20mg', - RabbitMqEnv::RABBITMQ_USERNAME => $storeName . '_development', - RabbitMqEnv::RABBITMQ_VIRTUAL_HOST => '/' . $storeName . '_development_zed', - RabbitMqEnv::RABBITMQ_STORE_NAMES => [$storeName], - RabbitMqEnv::RABBITMQ_DEFAULT_CONNECTION => $storeName === APPLICATION_STORE, - ]; -}, $stores); - -// ---------- LOGGER - -$config[EventConstants::LOGGER_ACTIVE] = true; -$config[PropelOrmConstants::PROPEL_SHOW_EXTENDED_EXCEPTION] = true; - -$config[LogConstants::LOG_LEVEL] = Logger::INFO; - -// ---------------------------------------------------------------------------- -// ------------------------------ ZED (Gateway) ------------------------------- -// ---------------------------------------------------------------------------- - -$config[ZedRequestConstants::ZED_API_SSL_ENABLED] = false; -$config[ZedRequestConstants::HOST_ZED_API] - = $backendGatewayHost; - -$config[SessionConstants::ZED_SESSION_COOKIE_NAME] - = $config[SessionConstants::ZED_SESSION_COOKIE_DOMAIN] - = $backofficeHost; -$config[ZedRequestConstants::BASE_URL_ZED_API] = sprintf( - 'http://%s', - $backendGatewayHost, -); -$config[ZedRequestConstants::BASE_URL_SSL_ZED_API] = sprintf( - 'https://%s', - $backendGatewayHost, -); - -// ---------------------------------------------------------------------------- -// ------------------------------ BACKOFFICE ---------------------------------- -// ---------------------------------------------------------------------------- - -$config[ApplicationConstants::BASE_URL_ZED] = sprintf( - 'http://%s', - $backofficeHost, -); - -// ---------------------------------------------------------------------------- -// ------------------------------ FRONTEND ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[ApplicationConstants::HOST_YVES] - = $config[SessionConstants::YVES_SESSION_COOKIE_NAME] - = $config[SessionConstants::YVES_SESSION_COOKIE_DOMAIN] - = $yvesHost; -$config[ApplicationConstants::BASE_URL_YVES] - = $config[CustomerConstants::BASE_URL_YVES] - = $config[ProductManagementConstants::BASE_URL_YVES] - = $config[NewsletterConstants::BASE_URL_YVES] - = sprintf( - 'http://%s', - $yvesHost, - ); - -// ---------------------------------------------------------------------------- -// ------------------------------ API ----------------------------------------- -// ---------------------------------------------------------------------------- - -$config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN] - = sprintf( - 'http://%s', - $glueHost, - ); - -if (class_exists(TestifyConstants::class)) { - $config[TestifyConstants::GLUE_APPLICATION_DOMAIN] = $config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN]; -} - -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = '*'; - -// ---------------------------------------------------------------------------- -// ------------------------------ OMS ----------------------------------------- -// ---------------------------------------------------------------------------- - -require 'common/config_oms-development.php'; diff --git a/config/Shared/config_default-development_AT.php b/config/Shared/config_default-development_AT.php deleted file mode 100644 index 76448d910e..0000000000 --- a/config/Shared/config_default-development_AT.php +++ /dev/null @@ -1,5 +0,0 @@ -getAllowedStores(), Store::getInstance()->getAllowedStores()); -$backendApiHost = sprintf('backend-api-test.%s.%s.local', $storeLowerCase, $domain); -$backendGatewayHost = sprintf('backend-gateway-test.%s.%s.local', $storeLowerCase, $domain); -$backofficeHost = sprintf('backoffice-test.%s.%s.local', $storeLowerCase, $domain); -$glueHost = sprintf('glue-test.de.%s.local', $domain); -$yvesHost = sprintf('www-test.%s.%s.local', $storeLowerCase, $domain); -// ---------------------------------------------------------------------------- -// ------------------------------ CODEBASE ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[KernelConstants::RESOLVABLE_CLASS_NAMES_CACHE_ENABLED] = false; -$config[KernelConstants::RESOLVED_INSTANCE_CACHE_ENABLED] = false; - -// >>> Debug - -$config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] = true; - -// >>> Dev tools -$config[KernelConstants::ENABLE_CONTAINER_OVERRIDING] = true; -$config[ConsoleConstants::ENABLE_DEVELOPMENT_CONSOLE_COMMANDS] = true; -$config[DocumentationGeneratorRestApiConstants::ENABLE_REST_API_DOCUMENTATION_GENERATION] = true; - -// >>> ErrorHandler -$config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class; - -// ---------------------------------------------------------------------------- -// ------------------------------ SECURITY ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[SessionConstants::ZED_SSL_ENABLED] - = $config[SessionConstants::YVES_SSL_ENABLED] - = $config[RouterConstants::YVES_IS_SSL_ENABLED] - = $config[RouterConstants::ZED_IS_SSL_ENABLED] - = $config[HttpConstants::ZED_HTTP_STRICT_TRANSPORT_SECURITY_ENABLED] - = $config[HttpConstants::YVES_HTTP_STRICT_TRANSPORT_SECURITY_ENABLED] - = $config[ApplicationConstants::ZED_SSL_ENABLED] - = $config[ApplicationConstants::YVES_SSL_ENABLED] - = false; - -$trustedHosts - = $config[HttpConstants::ZED_TRUSTED_HOSTS] - = $config[HttpConstants::YVES_TRUSTED_HOSTS] - = [ - $yvesHost, - $backofficeHost, - $backendGatewayHost, - $backendApiHost, - 'localhost', -]; - -$config[KernelConstants::DOMAIN_WHITELIST] = array_merge($trustedHosts, $config[KernelConstants::DOMAIN_WHITELIST]); - -// ---------------------------------------------------------------------------- -// ------------------------------ AUTHENTICATION ------------------------------ -// ---------------------------------------------------------------------------- - -require 'common/config_oauth-devvm.php'; - -// ---------------------------------------------------------------------------- -// ------------------------------ SERVICES ------------------------------------ -// ---------------------------------------------------------------------------- - -require 'common/config_services-devvm.php'; -require 'common/config_logs-files.php'; - -// >>> DATABASE -$config[PropelConstants::ZED_DB_USERNAME] = 'devtest'; -$config[PropelConstants::ZED_DB_PASSWORD] = 'mate20mg'; -$config[PropelConstants::ZED_DB_DATABASE] = sprintf('%s_devtest_zed', APPLICATION_CODE_BUCKET); - -// >>> STORAGE -$config[StorageRedisConstants::STORAGE_REDIS_DATABASE] = 3; - -// >>> SESSION -$config[SessionConstants::YVES_SESSION_SAVE_HANDLER] = SessionRedisConfig::SESSION_HANDLER_REDIS; - -$config[SessionRedisConstants::YVES_SESSION_REDIS_DATABASE] - = $config[SessionRedisConstants::ZED_SESSION_REDIS_DATABASE] = 5; - -// >>> QUEUE - -$config[EventConstants::EVENT_CHUNK] = 5000; - -$config[RabbitMqEnv::RABBITMQ_API_VIRTUAL_HOST] - = $config[RabbitMqEnv::RABBITMQ_VIRTUAL_HOST] - = sprintf('/%s_devtest_zed', APPLICATION_STORE); -$config[RabbitMqEnv::RABBITMQ_USERNAME] = sprintf('%s_devtest', APPLICATION_STORE); - -$config[RabbitMqEnv::RABBITMQ_CONNECTIONS] = array_map(static function ($storeName) { - return [ - RabbitMqEnv::RABBITMQ_CONNECTION_NAME => $storeName . '-connection', - RabbitMqEnv::RABBITMQ_HOST => 'localhost', - RabbitMqEnv::RABBITMQ_PORT => '5672', - RabbitMqEnv::RABBITMQ_PASSWORD => 'mate20mg', - RabbitMqEnv::RABBITMQ_USERNAME => $storeName . '_devtest', - RabbitMqEnv::RABBITMQ_VIRTUAL_HOST => '/' . $storeName . '_devtest_zed', - RabbitMqEnv::RABBITMQ_STORE_NAMES => [$storeName], - RabbitMqEnv::RABBITMQ_DEFAULT_CONNECTION => $storeName === APPLICATION_STORE, - ]; -}, $stores); - -// ---------- LOGGER - -$config[LogConstants::LOG_LEVEL] = Logger::CRITICAL; - -// ---------------------------------------------------------------------------- -// ------------------------------ ZED (Gateway)-------------------------------- -// ---------------------------------------------------------------------------- - -$config[ZedRequestConstants::ZED_API_SSL_ENABLED] = false; -$config[ZedRequestConstants::HOST_ZED_API] = $backendGatewayHost; -$config[SessionConstants::ZED_SESSION_COOKIE_NAME] - = $config[SessionConstants::ZED_SESSION_COOKIE_DOMAIN] - = $backofficeHost; -$config[ZedRequestConstants::BASE_URL_ZED_API] = sprintf( - 'http://%s', - $backendGatewayHost, -); -$config[ZedRequestConstants::BASE_URL_SSL_ZED_API] = sprintf( - 'https://%s', - $backendGatewayHost, -); - -// ---------------------------------------------------------------------------- -// ------------------------------ BACKOFFICE ---------------------------------- -// ---------------------------------------------------------------------------- - -$config[ApplicationConstants::BASE_URL_ZED] = sprintf( - 'http://%s', - $backofficeHost, -); - -// ---------------------------------------------------------------------------- -// ------------------------------ FRONTEND ------------------------------------ -// ---------------------------------------------------------------------------- - -$config[ApplicationConstants::HOST_YVES] - = $config[SessionConstants::YVES_SESSION_COOKIE_NAME] - = $config[SessionConstants::YVES_SESSION_COOKIE_DOMAIN] - = $yvesHost; -$config[ApplicationConstants::BASE_URL_YVES] - = $config[CustomerConstants::BASE_URL_YVES] - = $config[ProductManagementConstants::BASE_URL_YVES] - = $config[NewsletterConstants::BASE_URL_YVES] - = sprintf( - 'http://%s', - $yvesHost, - ); - -// ---------------------------------------------------------------------------- -// ------------------------------ API ----------------------------------------- -// ---------------------------------------------------------------------------- - -$config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN] - = sprintf( - 'http://%s', - $glueHost, - ); - -if (class_exists(TestifyConstants::class)) { - $config[TestifyConstants::GLUE_APPLICATION_DOMAIN] = $config[GlueApplicationConstants::GLUE_APPLICATION_DOMAIN]; -} - -$config[GlueApplicationConstants::GLUE_APPLICATION_CORS_ALLOW_ORIGIN] = '*'; - -// ---------------------------------------------------------------------------- -// ------------------------------ OMS ----------------------------------------- -// ---------------------------------------------------------------------------- - -require 'common/config_oms-development.php'; diff --git a/deploy.ci.acceptance.mariadb.yml b/deploy.ci.acceptance.mariadb.yml index e6b12e619b..a54efef0ae 100644 --- a/deploy.ci.acceptance.mariadb.yml +++ b/deploy.ci.acceptance.mariadb.yml @@ -116,6 +116,9 @@ services: root: username: "root" password: "secret" + endpoints: + localhost:3306: + protocol: tcp broker: engine: rabbitmq version: '3.9' diff --git a/deploy.ci.acceptance.yml b/deploy.ci.acceptance.yml index 1c69a4bb82..7e5932ed37 100644 --- a/deploy.ci.acceptance.yml +++ b/deploy.ci.acceptance.yml @@ -115,6 +115,9 @@ services: root: username: "root" password: "secret" + endpoints: + localhost:5432: + protocol: tcp broker: engine: rabbitmq version: '3.9' diff --git a/setup b/setup deleted file mode 100644 index 2d4ae6ea5a..0000000000 --- a/setup +++ /dev/null @@ -1,5 +0,0 @@ -This file is temporarily necessary to be able to `vagrant up` the VM. - -Please use https://github.com/spryker/install and - vendor/bin/install -now.