diff --git a/.github/.metadata.json b/.github/.metadata.json index 4f52d256..1c8a4040 100644 --- a/.github/.metadata.json +++ b/.github/.metadata.json @@ -1,14 +1,14 @@ { - "templateVersion": "0.1", + "templateVersion": "0.2", "product": { "name": "Magento Cloud Docker", "description": "The Magento Cloud Docker implementation deploys Cloud projects to a local workstation so that you can develop and test your code in a simulated Cloud environment" }, "contacts": { "team": { - "name": "Magic Mountain", - "DL": "Grp-magento-cloud-all", - "slackChannel": "magic_mountain" + "name": "Mystic Mountain", + "DL": "Grp-Mystic-Mountain", + "slackChannel": "#mystic-mountain-team" } }, "ticketTracker": { @@ -17,10 +17,8 @@ }, "securityJiraQueue": { "projectKey": "MAGREQ", - "component": "Magento Cloud Engineering" + "component": "MAGREQ/Magento Cloud Engineering" } }, - "staticScan": { - "enable": false - } + "productionCodeBranches": ["1.0", "1.1", "1.2", "1.3"] } diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 637f3a24..5eb057af 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,47 +1,75 @@ -# Contributor Covenant Code of Conduct +# Magento Code of Conduct ## Our Pledge -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment include: +Examples of behavior that contribute to a positive environment for our project and community include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best, not just for us as individuals but for the overall community -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Publishing others’ private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. +Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. +This Code of Conduct applies when an individual is representing the project or its community both within project spaces and in public spaces. Examples of representing a project or community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at engcom@magento.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by first contacting the project team at engcom@adobe.com. Oversight of Adobe projects is handled by the Adobe Open Source Office, which has final say in any violations and enforcement of this Code of Conduct and can be reached at Grp-opensourceoffice@adobe.com. All complaints will be reviewed and investigated promptly and fairly. -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. +The project team must respect the privacy and security of the reporter of any incident. -## Attribution +Project maintainers who do not follow or enforce the Code of Conduct may face temporary or permanent repercussions as determined by other members of the project's leadership or the Adobe Open Source Office. + +## Enforcement Guidelines + +Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to be in violation of this Code of Conduct: + +**1. Correction** + +Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +Consequence: A private, written warning from project maintainers describing the violation and why the behavior was unacceptable. A public apology may be requested from the violator before any further involvement in the project by violator. + +**2. Warning** -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] +Community Impact: A relatively minor violation through a single incident or series of actions. -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +Consequence: A written warning from project maintainers that includes stated consequences for continued unacceptable behavior. Violator must refrain from interacting with the people involved for a specified period of time as determined by the project maintainers, including, but not limited to, unsolicited interaction with those enforcing the Code of Conduct through channels such as community spaces and social media. Continued violations may lead to a temporary or permanent ban. + +**3. Temporary Ban** + +Community Impact: A more serious violation of community standards, including sustained unacceptable behavior. + +Consequence: A temporary ban from any interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Failure to comply with the temporary ban may lead to a permanent ban. + +**4. Permanent Ban** + +Community Impact: Demonstrating a consistent pattern of violation of community standards or an egregious violation of community standards, including, but not limited to, sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +Consequence: A permanent ban from any interaction with the community. + +## Attribution +This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. diff --git a/composer.json b/composer.json index bdee8976..0fb17f2b 100644 --- a/composer.json +++ b/composer.json @@ -2,33 +2,33 @@ "name": "magento/magento-cloud-docker", "description": "Magento Cloud Docker", "type": "magento2-component", - "version": "1.3.4", + "version": "1.4.4", "license": [ "OSL-3.0", "AFL-3.0" ], "require": { - "php": "^7.2 || ^8.0", + "php": "^8.0", "ext-json": "*", - "composer/composer": "^1.4 || ^2.0", + "composer/composer": "^1.9 || ^2.8 || !=2.2.16", "composer/semver": "@stable", - "illuminate/config": "^5.5||^8.77", - "symfony/config": "^4.4 || ^5.1", - "symfony/console": "^2.8 || ^4.0 || ^5.1", - "symfony/dependency-injection": "^3.3 || ^4.3 || ^5.1", - "symfony/yaml": "^3.3 || ^4.0 || ^5.1" + "illuminate/config": "^8.77 || ^10.0 || ^11.0 || ^12.16", + "symfony/config": "^4.4 || ^5.1|| ^5.4 || ^6.4 || ^7.2", + "symfony/console": "^4.4 || ^5.1 || ^5.4 || ^6.4 || ^7.2", + "symfony/dependency-injection": "^4.4 || ^5.1|| ^5.4 || ^6.4 || ^7.2", + "symfony/yaml": "^4.4 || ^5.1 || ^5.4|| ^6.4 || ^7.2" }, "require-dev": { - "codeception/codeception": "^4.1", - "codeception/module-asserts": "^1.2", - "codeception/module-db": "^1.0", - "codeception/module-phpbrowser": "^1.0", - "codeception/module-rest": "^1.2", - "consolidation/robo": "^1.2", + "codeception/codeception": "^4.1 || ^5.1", + "codeception/module-asserts": "^1.2 || ^3.0", + "codeception/module-db": "^1.0 || ^3.0", + "codeception/module-phpbrowser": "^1.0 || ^3.0", + "codeception/module-rest": "^1.2 || ^3.0", + "consolidation/robo": "^2.0 || ^3.0 || ^4.0 || ^5.0", "phpmd/phpmd": "@stable", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^8.5 || ^9.5", - "squizlabs/php_codesniffer": "^3.0" + "phpstan/phpstan": "^1.8 || ^2.0", + "phpunit/phpunit": "^10.0", + "squizlabs/php_codesniffer": "^3.7" }, "bin": [ "bin/ece-docker" @@ -55,7 +55,8 @@ "test:integration": "phpunit --configuration tests/integration" }, "config": { - "sort-packages": true + "sort-packages": true, + "optimize-autoloader": true }, "prefer-stable": true, "extra": { diff --git a/config/services.xml b/config/services.xml index 3e08211f..319f8350 100644 --- a/config/services.xml +++ b/config/services.xml @@ -9,6 +9,7 @@ + @@ -23,6 +24,7 @@ + diff --git a/images/elasticsearch/6.5/Dockerfile b/images/elasticsearch/6.5/Dockerfile deleted file mode 100644 index 26b9f815..00000000 --- a/images/elasticsearch/6.5/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:6.5.4 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml - -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/6.5/docker-entrypoint.sh b/images/elasticsearch/6.5/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/6.5/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/6.8/Dockerfile b/images/elasticsearch/6.8/Dockerfile deleted file mode 100644 index 64f973a6..00000000 --- a/images/elasticsearch/6.8/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.15 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/6.8/docker-entrypoint.sh b/images/elasticsearch/6.8/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/6.8/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/7.5/Dockerfile b/images/elasticsearch/7.5/Dockerfile deleted file mode 100644 index a4d9a188..00000000 --- a/images/elasticsearch/7.5/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.5.2 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/7.5/docker-entrypoint.sh b/images/elasticsearch/7.5/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/7.5/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/7.6/Dockerfile b/images/elasticsearch/7.6/Dockerfile deleted file mode 100644 index 1f009db6..00000000 --- a/images/elasticsearch/7.6/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/7.6/docker-entrypoint.sh b/images/elasticsearch/7.6/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/7.6/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/7.7/Dockerfile b/images/elasticsearch/7.7/Dockerfile deleted file mode 100644 index 4a848b83..00000000 --- a/images/elasticsearch/7.7/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.7.1 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/7.7/docker-entrypoint.sh b/images/elasticsearch/7.7/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/7.7/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/7.7/docker-healthcheck.sh b/images/elasticsearch/7.7/docker-healthcheck.sh deleted file mode 100644 index a6d853cf..00000000 --- a/images/elasticsearch/7.7/docker-healthcheck.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then - health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") - if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then - exit 0 - fi - echo >&2 "Unexpected health status: $health" -fi - -exit 1 diff --git a/images/elasticsearch/7.9/Dockerfile b/images/elasticsearch/7.9/Dockerfile deleted file mode 100644 index ffbc60b0..00000000 --- a/images/elasticsearch/7.9/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:7.9.3 - -RUN yum -y install zip && \ - zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \ - yum remove -y zip && \ - yum -y clean all && \ - rm -rf /var/cache - -RUN echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml -RUN bin/elasticsearch-plugin install -b analysis-icu && \ - bin/elasticsearch-plugin install -b analysis-phonetic - -ADD docker-healthcheck.sh /docker-healthcheck.sh -ADD docker-entrypoint.sh /docker-entrypoint.sh - -HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 9200 9300 diff --git a/images/elasticsearch/7.9/docker-entrypoint.sh b/images/elasticsearch/7.9/docker-entrypoint.sh deleted file mode 100755 index e2c63c4c..00000000 --- a/images/elasticsearch/7.9/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if [[ -n "$ES_PLUGINS" ]]; then - echo "Installing plugins: $ES_PLUGNS" - for PLUGIN in $ES_PLUGINS - do - ./bin/elasticsearch-plugin install -b "$PLUGIN" - done -fi - -/bin/bash /usr/local/bin/docker-entrypoint.sh diff --git a/images/elasticsearch/7.9/docker-healthcheck.sh b/images/elasticsearch/7.9/docker-healthcheck.sh deleted file mode 100644 index a6d853cf..00000000 --- a/images/elasticsearch/7.9/docker-healthcheck.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eo pipefail - -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then - health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") - if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then - exit 0 - fi - echo >&2 "Unexpected health status: $health" -fi - -exit 1 diff --git a/images/nginx/1.19/Dockerfile b/images/nginx/1.24/Dockerfile similarity index 98% rename from images/nginx/1.19/Dockerfile rename to images/nginx/1.24/Dockerfile index e75bac29..ca4a2585 100644 --- a/images/nginx/1.19/Dockerfile +++ b/images/nginx/1.24/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.19 +FROM nginx:1.24 ENV UPLOAD_MAX_FILESIZE 64M ENV XDEBUG_HOST fpm_xdebug diff --git a/images/nginx/1.19/docker-entrypoint.sh b/images/nginx/1.24/docker-entrypoint.sh similarity index 100% rename from images/nginx/1.19/docker-entrypoint.sh rename to images/nginx/1.24/docker-entrypoint.sh diff --git a/images/nginx/1.19/etc/nginx.conf b/images/nginx/1.24/etc/nginx.conf similarity index 100% rename from images/nginx/1.19/etc/nginx.conf rename to images/nginx/1.24/etc/nginx.conf diff --git a/images/nginx/1.19/etc/vhost.conf b/images/nginx/1.24/etc/vhost.conf similarity index 100% rename from images/nginx/1.19/etc/vhost.conf rename to images/nginx/1.24/etc/vhost.conf diff --git a/images/nginx/1.19/etc/xdebug-upstream.conf b/images/nginx/1.24/etc/xdebug-upstream.conf similarity index 100% rename from images/nginx/1.19/etc/xdebug-upstream.conf rename to images/nginx/1.24/etc/xdebug-upstream.conf diff --git a/images/opensearch/1.3/Dockerfile b/images/opensearch/1.3/Dockerfile new file mode 100644 index 00000000..66ea8c91 --- /dev/null +++ b/images/opensearch/1.3/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:1.3.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/1.3/docker-entrypoint.sh b/images/opensearch/1.3/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/1.3/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/elasticsearch/6.8/docker-healthcheck.sh b/images/opensearch/1.3/docker-healthcheck.sh similarity index 73% rename from images/elasticsearch/6.8/docker-healthcheck.sh rename to images/opensearch/1.3/docker-healthcheck.sh index a6d853cf..4081bbb2 100644 --- a/images/elasticsearch/6.8/docker-healthcheck.sh +++ b/images/opensearch/1.3/docker-healthcheck.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eo pipefail -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then exit 0 diff --git a/images/opensearch/2.12/Dockerfile b/images/opensearch/2.12/Dockerfile new file mode 100644 index 00000000..613d3c58 --- /dev/null +++ b/images/opensearch/2.12/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:2.12.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/2.12/docker-entrypoint.sh b/images/opensearch/2.12/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/2.12/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/elasticsearch/7.5/docker-healthcheck.sh b/images/opensearch/2.12/docker-healthcheck.sh similarity index 73% rename from images/elasticsearch/7.5/docker-healthcheck.sh rename to images/opensearch/2.12/docker-healthcheck.sh index a6d853cf..4081bbb2 100644 --- a/images/elasticsearch/7.5/docker-healthcheck.sh +++ b/images/opensearch/2.12/docker-healthcheck.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eo pipefail -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then exit 0 diff --git a/images/opensearch/2.3/Dockerfile b/images/opensearch/2.3/Dockerfile new file mode 100644 index 00000000..cbdac08a --- /dev/null +++ b/images/opensearch/2.3/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:2.3.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/2.3/docker-entrypoint.sh b/images/opensearch/2.3/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/2.3/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/elasticsearch/6.5/docker-healthcheck.sh b/images/opensearch/2.3/docker-healthcheck.sh similarity index 73% rename from images/elasticsearch/6.5/docker-healthcheck.sh rename to images/opensearch/2.3/docker-healthcheck.sh index a6d853cf..4081bbb2 100644 --- a/images/elasticsearch/6.5/docker-healthcheck.sh +++ b/images/opensearch/2.3/docker-healthcheck.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eo pipefail -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then exit 0 diff --git a/images/opensearch/2.4/Dockerfile b/images/opensearch/2.4/Dockerfile new file mode 100644 index 00000000..945c59a8 --- /dev/null +++ b/images/opensearch/2.4/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:2.4.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/2.4/docker-entrypoint.sh b/images/opensearch/2.4/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/2.4/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/elasticsearch/7.6/docker-healthcheck.sh b/images/opensearch/2.4/docker-healthcheck.sh similarity index 73% rename from images/elasticsearch/7.6/docker-healthcheck.sh rename to images/opensearch/2.4/docker-healthcheck.sh index a6d853cf..4081bbb2 100644 --- a/images/elasticsearch/7.6/docker-healthcheck.sh +++ b/images/opensearch/2.4/docker-healthcheck.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eo pipefail -if health="$(curl -fsSL "http://${ES_HOST:-elasticsearch}:${ES_PORT:-9200}/_cat/health?h=status")"; then +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then exit 0 diff --git a/images/opensearch/2.5/Dockerfile b/images/opensearch/2.5/Dockerfile new file mode 100644 index 00000000..fbf3067c --- /dev/null +++ b/images/opensearch/2.5/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:2.5.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/2.5/docker-entrypoint.sh b/images/opensearch/2.5/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/2.5/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/opensearch/2.5/docker-healthcheck.sh b/images/opensearch/2.5/docker-healthcheck.sh new file mode 100644 index 00000000..4081bbb2 --- /dev/null +++ b/images/opensearch/2.5/docker-healthcheck.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then + health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") + if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then + exit 0 + fi + echo >&2 "Unexpected health status: $health" +fi + +exit 1 diff --git a/images/opensearch/3.0/Dockerfile b/images/opensearch/3.0/Dockerfile new file mode 100644 index 00000000..2b2e876b --- /dev/null +++ b/images/opensearch/3.0/Dockerfile @@ -0,0 +1,15 @@ +FROM opensearchproject/opensearch:3.0.0 + +USER opensearch + +RUN bin/opensearch-plugin install -b analysis-icu && \ + bin/opensearch-plugin install -b analysis-phonetic + +ADD docker-healthcheck.sh /docker-healthcheck.sh +ADD docker-entrypoint.sh /docker-entrypoint.sh + +HEALTHCHECK --retries=3 CMD ["bash", "/docker-healthcheck.sh"] + +ENTRYPOINT ["/docker-entrypoint.sh"] + +EXPOSE 9200 9300 diff --git a/images/opensearch/3.0/docker-entrypoint.sh b/images/opensearch/3.0/docker-entrypoint.sh new file mode 100755 index 00000000..ad80b15a --- /dev/null +++ b/images/opensearch/3.0/docker-entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if [[ -n "$OS_PLUGINS" ]]; then + echo "Installing plugins: $OS_PLUGINS" + for PLUGIN in $OS_PLUGINS + do + ./bin/opensearch-plugin install -b "$PLUGIN" + done +fi + +/bin/bash /usr/share/opensearch/opensearch-docker-entrypoint.sh diff --git a/images/opensearch/3.0/docker-healthcheck.sh b/images/opensearch/3.0/docker-healthcheck.sh new file mode 100644 index 00000000..4081bbb2 --- /dev/null +++ b/images/opensearch/3.0/docker-healthcheck.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +if health="$(curl -fsSL "http://${OS_HOST:-opensearch}:${OS_HOST:-9200}/_cat/health?h=status")"; then + health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") + if [ "$health" = 'green' ] || [ "$health" = 'yellow' ]; then + exit 0 + fi + echo >&2 "Unexpected health status: $health" +fi + +exit 1 diff --git a/images/php/7.2-cli/Dockerfile b/images/php/7.2-cli/Dockerfile deleted file mode 100644 index d474c800..00000000 --- a/images/php/7.2-cli/Dockerfile +++ /dev/null @@ -1,238 +0,0 @@ -# This file is automatically generated. Do not edit directly. # -FROM golang:1.15 AS builder - -RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ - && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ - && tar -xf mhsendmail.tar.gz \ - && mkdir -p ./src/github.com/mailhog/ \ - && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ - && cd ./src/github.com/mailhog/mhsendmail/ \ - && go get . \ - && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . - -FROM php:7.2-cli - -ARG COMPOSER_VERSION=1.10.22 -ARG MAGENTO_ROOT=/app -ARG COMPOSER_ALLOW_SUPERUSER=1 -ARG COMPOSER_HOME=/composer -ARG CRONTAB="" - -ENV COMPOSER_MEMORY_LIMIT -1 -ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} -ENV COMPOSER_HOME ${COMPOSER_HOME} -ENV PHP_MEMORY_LIMIT -1 -ENV PHP_VALIDATE_TIMESTAMPS 1 -ENV DEBUG false -ENV MAGENTO_RUN_MODE production -ENV SENDMAIL_PATH /dev/null -ENV PHPRC ${MAGENTO_ROOT}/php.ini - -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl - -# Configure Node.js version -RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - -# Install dependencies -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y --no-install-recommends \ - apt-utils \ - cron \ - git \ - mariadb-client \ - nano \ - nodejs \ - python3 \ - python3-pip \ - redis-tools \ - sendmail-bin \ - sendmail \ - sudo \ - unzip \ - vim \ - openssh-client \ - gnupg2 \ - ca-certificates \ - lsb-release \ - software-properties-common \ - libbz2-dev \ - libjpeg62-turbo-dev \ - libpng-dev \ - libfreetype6-dev \ - libgeoip-dev \ - wget \ - libgmp-dev \ - libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ - libc-client-dev \ - libkrb5-dev \ - libicu-dev \ - libldap2-dev \ - libpspell-dev \ - librecode0 \ - librecode-dev \ - libssh2-1 \ - libssh2-1-dev \ - libtidy-dev \ - libxslt1-dev \ - libyaml-dev \ - libzip-dev \ - zip \ - && rm -rf /var/lib/apt/lists/* - -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml - -# Install Grunt -RUN npm install -g grunt-cli - -# Install MailHog -COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ -RUN sudo chmod +x /usr/local/bin/mhsendmail - -# Configure the gd library -RUN docker-php-ext-configure \ - gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-configure \ - imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - opcache --enable-opcache -RUN docker-php-ext-configure \ - zip --with-libzip - -# Install required PHP extensions -RUN docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - mysqli \ - opcache \ - pdo_mysql \ - pspell \ - recode \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - tidy \ - xmlrpc \ - xsl \ - zip \ - pcntl - -RUN pecl install -o -f \ - geoip-1.1.1 \ - gnupg \ - igbinary \ - imagick \ - mailparse-3.1.3 \ - msgpack \ - oauth \ - pcov \ - propro \ - raphf \ - redis \ - ssh2-1.1.2 \ - xdebug-3.1.2 \ - yaml - -RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ - && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ - && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ - && apt-get update \ - && apt-get install blackfire-php \ - && rm -rf /var/lib/apt/lists/* -RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ - && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install -RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ - && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ - && apt-get remove libsodium* -y \ - && mkdir -p /tmp/libsodium \ - && curl -sL https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz | tar xzf - -C /tmp/libsodium \ - && cd /tmp/libsodium/libsodium-1.0.18-RELEASE/ \ - && ./configure \ - && make && make check \ - && make install \ - && cd / \ - && rm -rf /tmp/libsodium \ - && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz - -ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini -ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini -ADD etc/php-pcov.ini /usr/local/etc/php/conf.d/zz-pcov-settings.ini -ADD etc/mail.ini /usr/local/etc/php/conf.d/zz-mail.ini -ADD etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini - -# Get composer installed to /usr/local/bin/composer -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} --filename=composer - -ADD bin/* /usr/local/bin/ - -RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www - -ADD docker-entrypoint.sh /docker-entrypoint.sh - -RUN ["chmod", "+x", \ - "/docker-entrypoint.sh", \ - "/usr/local/bin/magento-installer", \ - "/usr/local/bin/magento-command", \ - "/usr/local/bin/mftf-command", \ - "/usr/local/bin/ece-command", \ - "/usr/local/bin/cloud-build", \ - "/usr/local/bin/cloud-deploy", \ - "/usr/local/bin/cloud-post-deploy", \ - "/usr/local/bin/run-cron", \ - "/usr/local/bin/run-hooks" \ -] - -RUN mkdir -p ${MAGENTO_ROOT} - -VOLUME ${MAGENTO_ROOT} - -RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d /etc/cron.d ${MAGENTO_ROOT} ${COMPOSER_HOME} -RUN if [ ! -z "${CRONTAB}" ]; then echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log ; fi - -ENTRYPOINT ["/docker-entrypoint.sh"] - -WORKDIR ${MAGENTO_ROOT} - -USER root - -CMD ["bash"] diff --git a/images/php/7.2-fpm/Dockerfile b/images/php/7.2-fpm/Dockerfile deleted file mode 100644 index e0ee3cbd..00000000 --- a/images/php/7.2-fpm/Dockerfile +++ /dev/null @@ -1,196 +0,0 @@ -# This file is automatically generated. Do not edit directly. # -FROM golang:1.15 AS builder - -RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch="arm64"; fi \ - && wget -O mhsendmail.tar.gz https://github.com/mailhog/mhsendmail/archive/refs/tags/v0.2.0.tar.gz \ - && tar -xf mhsendmail.tar.gz \ - && mkdir -p ./src/github.com/mailhog/ \ - && mv ./mhsendmail-0.2.0 ./src/github.com/mailhog/mhsendmail \ - && cd ./src/github.com/mailhog/mhsendmail/ \ - && go get . \ - && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . - -FROM php:7.2-fpm - -ARG MAGENTO_ROOT=/app - -ENV PHP_MEMORY_LIMIT 2G -ENV PHP_VALIDATE_TIMESTAMPS 1 -ENV DEBUG false -ENV MAGENTO_RUN_MODE production -ENV UPLOAD_MAX_FILESIZE 64M -ENV SENDMAIL_PATH /dev/null -ENV PHPRC ${MAGENTO_ROOT}/php.ini - -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl - -# Install dependencies -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y --no-install-recommends \ - apt-utils \ - sendmail-bin \ - sendmail \ - sudo \ - iproute2 \ - git \ - gnupg2 \ - ca-certificates \ - lsb-release \ - software-properties-common \ - libbz2-dev \ - libjpeg62-turbo-dev \ - libpng-dev \ - libfreetype6-dev \ - libgeoip-dev \ - wget \ - libgmp-dev \ - libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ - libc-client-dev \ - libkrb5-dev \ - libicu-dev \ - libldap2-dev \ - libpspell-dev \ - librecode0 \ - librecode-dev \ - libssh2-1 \ - libssh2-1-dev \ - libtidy-dev \ - libxslt1-dev \ - libyaml-dev \ - libzip-dev \ - zip \ - && rm -rf /var/lib/apt/lists/* - -# Install MailHog -COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/local/bin/ -RUN sudo chmod +x /usr/local/bin/mhsendmail - -# Configure the gd library -RUN docker-php-ext-configure \ - gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-configure \ - imap --with-kerberos --with-imap-ssl -RUN docker-php-ext-configure \ - opcache --enable-opcache -RUN docker-php-ext-configure \ - zip --with-libzip - -# Install required PHP extensions -RUN docker-php-ext-install -j$(nproc) \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - gettext \ - gmp \ - imap \ - intl \ - mysqli \ - opcache \ - pdo_mysql \ - pspell \ - recode \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - tidy \ - xmlrpc \ - xsl \ - zip \ - pcntl - -RUN pecl install -o -f \ - geoip-1.1.1 \ - gnupg \ - igbinary \ - imagick \ - mailparse-3.1.3 \ - msgpack \ - oauth \ - pcov \ - propro \ - raphf \ - redis \ - ssh2-1.1.2 \ - xdebug-3.1.2 \ - yaml - -RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ - && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ - && echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \ - && apt-get update \ - && apt-get install blackfire-php \ - && rm -rf /var/lib/apt/lists/* -RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ - && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install -RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ - && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ - && apt-get remove libsodium* -y \ - && mkdir -p /tmp/libsodium \ - && curl -sL https://github.com/jedisct1/libsodium/archive/1.0.18-RELEASE.tar.gz | tar xzf - -C /tmp/libsodium \ - && cd /tmp/libsodium/libsodium-1.0.18-RELEASE/ \ - && ./configure \ - && make && make check \ - && make install \ - && cd / \ - && rm -rf /tmp/libsodium \ - && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz - -COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini -COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini -COPY etc/php-pcov.ini /usr/local/etc/php/conf.d/zz-pcov-settings.ini -COPY etc/mail.ini /usr/local/etc/php/conf.d/zz-mail.ini -COPY etc/php-fpm.conf /usr/local/etc/ -COPY etc/php-gnupg.ini /usr/local/etc/php/conf.d/gnupg.ini - -RUN groupadd -g 1000 www && useradd -g 1000 -u 1000 -d ${MAGENTO_ROOT} -s /bin/bash www - -COPY docker-entrypoint.sh /docker-entrypoint.sh -RUN ["chmod", "+x", "/docker-entrypoint.sh"] - -RUN mkdir -p ${MAGENTO_ROOT} - -VOLUME ${MAGENTO_ROOT} - -RUN chown -R www:www /usr/local /var/www /var/log /usr/local/etc/php/conf.d ${MAGENTO_ROOT} - -ENTRYPOINT ["/docker-entrypoint.sh"] - -WORKDIR ${MAGENTO_ROOT} - -USER root - -CMD ["php-fpm", "-R"] diff --git a/images/php/7.3-cli/docker-entrypoint.sh b/images/php/7.3-cli/docker-entrypoint.sh deleted file mode 100644 index 1e025ca7..00000000 --- a/images/php/7.3-cli/docker-entrypoint.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -[ "$DEBUG" = "true" ] && set -x - -if [ ! -z "${CRONTAB}" ]; then - echo "${CRONTAB}" > /etc/cron.d/magento && touch /var/log/cron.log -fi - -PHP_EXT_DIR=/usr/local/etc/php/conf.d - -# Enable PHP extensions -PHP_EXT_COM_ON=docker-php-ext-enable - -[ -d ${PHP_EXT_DIR} ] && rm -f ${PHP_EXT_DIR}/docker-php-ext-*.ini - -if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; then - ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} -fi - -# Configure composer -[ ! -z "${COMPOSER_VERSION}" ] && \ - composer self-update $COMPOSER_VERSION - -[ ! -z "${COMPOSER_GITHUB_TOKEN}" ] && \ - composer config --global github-oauth.github.com $COMPOSER_GITHUB_TOKEN - -[ ! -z "${COMPOSER_MAGENTO_USERNAME}" ] && \ - composer config --global http-basic.repo.magento.com \ - $COMPOSER_MAGENTO_USERNAME $COMPOSER_MAGENTO_PASSWORD - -exec "$@" diff --git a/images/php/8.0-cli/bin/cloud-build b/images/php/8.0-cli/bin/cloud-build deleted file mode 100644 index bbd584c9..00000000 --- a/images/php/8.0-cli/bin/cloud-build +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -set -e - -[ "$DEBUG" = "true" ] && set -x - -RUN_HOOKS="run-hooks" - -if [ "$MAGENTO_RUN_MODE" == "production" ]; then - echo "Cleaning directories:" - - if [ "$INSTALLATION_TYPE" == "composer" ]; then - echo "Cleaning setup directory." - rm -rf $MAGENTO_ROOT/setup/* - fi - - echo "Cleaning vendor directory." - rm -rf $MAGENTO_ROOT/vendor/* - - echo "Cleaning generated directory." - rm -rf $MAGENTO_ROOT/generated/* - - echo "Removing app/etc/env.php file" - rm -f $MAGENTO_ROOT/app/etc/env.php -fi - -echo "Installing dependencies." - -composer --working-dir=$MAGENTO_ROOT install --no-suggest --no-ansi --no-interaction --no-progress --prefer-dist - -echo "Running \"build\" hook." - -$RUN_HOOKS build - -if [ "$MAGENTO_RUN_MODE" == "production" ]; then - echo "Setting file permissions." - - chown -R www:www $MAGENTO_ROOT - - find $MAGENTO_ROOT/pub -type f -exec chmod 664 {} \; - find $MAGENTO_ROOT/pub -type d -exec chmod 775 {} \; -fi - -echo "Building complete." diff --git a/images/php/8.0-cli/bin/cloud-deploy b/images/php/8.0-cli/bin/cloud-deploy deleted file mode 100644 index f6b891bf..00000000 --- a/images/php/8.0-cli/bin/cloud-deploy +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -set -e - -[ "$DEBUG" = "true" ] && set -x - -echo "Running \"deploy\" hook." - -run-hooks deploy - -# check that Varnish exists -if ( varnish=$(curl -I varnish 2>&1 | grep -i "magento2") ); then - minor_magento_version=$(magento-command --version | sed "s/Magento CLI version \([0-9]*\.[0-9]*\).*/\1/") - if [[ "$minor_magento_version" != "2.1" ]]; then - output=$(magento-command config:set system/full_page_cache/caching_application 2) - # as config:set does not return error code, we check output text to continue set varnish settings - if [[ $output == *"Value was saved"* ]]; then - echo "Setting Varnish for Magento FPC." - magento-command setup:config:set --http-cache-hosts=varnish -n - else - echo $output - fi - fi -fi - -# set developer mode if it is configured in $MAGENTO_RUN_MODE -if [ "$MAGENTO_RUN_MODE" == "developer" ]; then - output=$(magento-command deploy:mode:set developer) - if [[ $output == *"Enabled developer mode."* ]]; then - echo "Enabled developer mode." - else - echo $output - fi -fi - - -echo "Deployment finished." diff --git a/images/php/8.0-cli/bin/cloud-post-deploy b/images/php/8.0-cli/bin/cloud-post-deploy deleted file mode 100644 index f5bb3956..00000000 --- a/images/php/8.0-cli/bin/cloud-post-deploy +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -[ "$DEBUG" = "true" ] && set -x - -echo "Running \"post-deploy\" hook." - -run-hooks post_deploy - -echo "Post deployment finished." diff --git a/images/php/8.0-cli/bin/ece-command b/images/php/8.0-cli/bin/ece-command deleted file mode 100644 index 36d896c5..00000000 --- a/images/php/8.0-cli/bin/ece-command +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -[ "$DEBUG" = "true" ] && set -x - -ECE_COMMAND="$MAGENTO_ROOT/vendor/bin/ece-tools" - -exec $ECE_COMMAND "$@" diff --git a/images/php/8.0-cli/bin/magento-command b/images/php/8.0-cli/bin/magento-command deleted file mode 100644 index 8d439f7d..00000000 --- a/images/php/8.0-cli/bin/magento-command +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -[ "$DEBUG" = "true" ] && set -x - -MAGENTO_COMMAND="php $MAGENTO_ROOT/bin/magento" - -exec $MAGENTO_COMMAND "$@" diff --git a/images/php/8.0-cli/bin/magento-installer b/images/php/8.0-cli/bin/magento-installer deleted file mode 100644 index 73645ab7..00000000 --- a/images/php/8.0-cli/bin/magento-installer +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -[ "$DEBUG" = "true" ] && set -x - -BUILD_COMMAND="cloud-build" -DEPLOY_COMMAND="cloud-deploy" - -$BUILD_COMMAND -$DEPLOY_COMMAND diff --git a/images/php/8.0-cli/bin/mftf-command b/images/php/8.0-cli/bin/mftf-command deleted file mode 100644 index 88eaa1df..00000000 --- a/images/php/8.0-cli/bin/mftf-command +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -[ "$DEBUG" = "true" ] && set -x - -MFTF_COMMAND="$MAGENTO_ROOT/vendor/bin/mftf" - -exec $MFTF_COMMAND "$@" diff --git a/images/php/8.0-cli/bin/run-cron b/images/php/8.0-cli/bin/run-cron deleted file mode 100644 index f6554a5c..00000000 --- a/images/php/8.0-cli/bin/run-cron +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -cron && tail -f -n0 /var/log/cron.log diff --git a/images/php/8.0-cli/bin/run-hooks b/images/php/8.0-cli/bin/run-hooks deleted file mode 100644 index 8ac215c9..00000000 --- a/images/php/8.0-cli/bin/run-hooks +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import subprocess -import json -import base64 - -# Disable output buffering. -os.environ['PYTHONUNBUFFERED'] = "1" - -# The list of available hooks. -available_hooks = ["build", "deploy", "post_deploy"] - - -# Prints a message and returns an exit code. -def error_exit(msg, code=1): - print(msg) - sys.exit(code) - - -# Gets Magento root path. -def get_magento_root(): - try: - return str(os.environ['MAGENTO_ROOT']) - except KeyError: - error_exit('Environment variable MAGENTO_ROOT is not available') - - -# Gets set hooks by hook name. -def get_hooks(hook_name): - try: - application = str(os.environ['MAGENTO_CLOUD_APPLICATION']) - content = json.loads(base64.b64decode(application).decode("utf-8")) - - return content['hooks'][hook_name] - except Exception as exc: - error_exit("Cannot decode string: " + str(exc)) - - -# Main function. -def main(): - if len(sys.argv) != 2: - error_exit("Usage: run-hooks ") - - hook_name = str(sys.argv[1]) - if hook_name not in available_hooks: - error_exit("The hook \"" + hook_name + "\" is not available. The list of available hooks: " + ", ".join(available_hooks)) - - try: - subprocess.check_call( - get_hooks(hook_name), - shell=True, - cwd=get_magento_root() - ) - except subprocess.CalledProcessError as exc: - error_exit("returned non-zero exit status " + str(exc.returncode)) - - -if __name__ == '__main__': - main() diff --git a/images/php/8.0-cli/etc/mail.ini b/images/php/8.0-cli/etc/mail.ini deleted file mode 100644 index c1620288..00000000 --- a/images/php/8.0-cli/etc/mail.ini +++ /dev/null @@ -1,2 +0,0 @@ -; Sendmail -sendmail_path = ${SENDMAIL_PATH} diff --git a/images/php/8.0-cli/etc/php-cli.ini b/images/php/8.0-cli/etc/php-cli.ini deleted file mode 100644 index dfaf04e4..00000000 --- a/images/php/8.0-cli/etc/php-cli.ini +++ /dev/null @@ -1,10 +0,0 @@ -; php.ini -memory_limit = ${PHP_MEMORY_LIMIT} -zlib.output_compression = on -realpath_cache_size = 32k -realpath_cache_ttl = 7200 -always_populate_raw_post_data = -1 -max_input_vars = 10000 -session.gc_probability = 1 -opcache.enable = 1 -opcache.validate_timestamps = ${PHP_VALIDATE_TIMESTAMPS} diff --git a/images/php/8.0-cli/etc/php-gnupg.ini b/images/php/8.0-cli/etc/php-gnupg.ini deleted file mode 100644 index f0f7e9a7..00000000 --- a/images/php/8.0-cli/etc/php-gnupg.ini +++ /dev/null @@ -1 +0,0 @@ -extension = gnupg.so diff --git a/images/php/8.0-cli/etc/php-pcov.ini b/images/php/8.0-cli/etc/php-pcov.ini deleted file mode 100644 index a9f0145a..00000000 --- a/images/php/8.0-cli/etc/php-pcov.ini +++ /dev/null @@ -1,2 +0,0 @@ -pcov.enabled = 1 -pcov.directory = ${MAGENTO_ROOT} diff --git a/images/php/8.0-cli/etc/php-xdebug.ini b/images/php/8.0-cli/etc/php-xdebug.ini deleted file mode 100644 index 57b1bd9f..00000000 --- a/images/php/8.0-cli/etc/php-xdebug.ini +++ /dev/null @@ -1,8 +0,0 @@ -; Xdebug settings will only kick in if the Xdebug module is loaded -xdebug.mode = debug -xdebug.client_port = 9001 -xdebug.start_with_request = trigger -xdebug.discover_client_host = false -xdebug.scream = false -xdebug.show_local_vars = 1 -xdebug.idekey = PHPSTORM diff --git a/images/php/8.0-fpm/docker-entrypoint.sh b/images/php/8.0-fpm/docker-entrypoint.sh deleted file mode 100644 index 0c8c5c9c..00000000 --- a/images/php/8.0-fpm/docker-entrypoint.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -[ "$DEBUG" = "true" ] && set -x - -PHP_EXT_DIR=/usr/local/etc/php/conf.d - -# Enable PHP extensions -PHP_EXT_COM_ON=docker-php-ext-enable - -[ -d ${PHP_EXT_DIR} ] && rm -f ${PHP_EXT_DIR}/docker-php-ext-*.ini - -if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; then - ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} -fi - -# Set host.docker.internal if not available -HOST_NAME="host.docker.internal" -HOST_IP=$(php -r "putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); echo gethostbyname('$HOST_NAME');") -if [[ "$HOST_IP" == "$HOST_NAME" ]]; then - HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }') - printf "\n%s %s\n" "$HOST_IP" "$HOST_NAME" >> /etc/hosts -fi - -exec "$@" diff --git a/images/php/8.0-fpm/etc/mail.ini b/images/php/8.0-fpm/etc/mail.ini deleted file mode 100644 index c1620288..00000000 --- a/images/php/8.0-fpm/etc/mail.ini +++ /dev/null @@ -1,2 +0,0 @@ -; Sendmail -sendmail_path = ${SENDMAIL_PATH} diff --git a/images/php/8.0-fpm/etc/php-fpm.conf b/images/php/8.0-fpm/etc/php-fpm.conf deleted file mode 100644 index d988b314..00000000 --- a/images/php/8.0-fpm/etc/php-fpm.conf +++ /dev/null @@ -1,25 +0,0 @@ -[global] - -error_log = /proc/self/fd/2 -daemonize = no - -[www] - -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - -listen = [::]:9000 - -pm = dynamic -pm.max_children = 10 -pm.start_servers = 4 -pm.min_spare_servers = 2 -pm.max_spare_servers = 6 -pm.status_path = /status - -clear_env = no - -env[MAGE_MODE] = $MAGENTO_RUN_MODE - -; Ensure worker stdout and stderr are sent to the main error log. -catch_workers_output = yes diff --git a/images/php/8.0-fpm/etc/php-fpm.ini b/images/php/8.0-fpm/etc/php-fpm.ini deleted file mode 100644 index 387c8aeb..00000000 --- a/images/php/8.0-fpm/etc/php-fpm.ini +++ /dev/null @@ -1,4 +0,0 @@ -memory_limit = ${PHP_MEMORY_LIMIT} -opcache.enable = 1 -opcache.validate_timestamps = ${PHP_VALIDATE_TIMESTAMPS} -user_ini.filename = diff --git a/images/php/8.0-fpm/etc/php-gnupg.ini b/images/php/8.0-fpm/etc/php-gnupg.ini deleted file mode 100644 index f0f7e9a7..00000000 --- a/images/php/8.0-fpm/etc/php-gnupg.ini +++ /dev/null @@ -1 +0,0 @@ -extension = gnupg.so diff --git a/images/php/8.0-fpm/etc/php-pcov.ini b/images/php/8.0-fpm/etc/php-pcov.ini deleted file mode 100644 index a9f0145a..00000000 --- a/images/php/8.0-fpm/etc/php-pcov.ini +++ /dev/null @@ -1,2 +0,0 @@ -pcov.enabled = 1 -pcov.directory = ${MAGENTO_ROOT} diff --git a/images/php/8.0-fpm/etc/php-xdebug.ini b/images/php/8.0-fpm/etc/php-xdebug.ini deleted file mode 100644 index 57b1bd9f..00000000 --- a/images/php/8.0-fpm/etc/php-xdebug.ini +++ /dev/null @@ -1,8 +0,0 @@ -; Xdebug settings will only kick in if the Xdebug module is loaded -xdebug.mode = debug -xdebug.client_port = 9001 -xdebug.start_with_request = trigger -xdebug.discover_client_host = false -xdebug.scream = false -xdebug.show_local_vars = 1 -xdebug.idekey = PHPSTORM diff --git a/images/php/8.1-cli/Dockerfile b/images/php/8.1-cli/Dockerfile index 9708007e..d810cd61 100644 --- a/images/php/8.1-cli/Dockerfile +++ b/images/php/8.1-cli/Dockerfile @@ -12,7 +12,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= FROM php:8.1.1-cli -ARG COMPOSER_VERSION=2.1.14 +ARG COMPOSER_VERSION=2.2.23 ARG MAGENTO_ROOT=/app ARG COMPOSER_ALLOW_SUPERUSER=1 ARG COMPOSER_HOME=/composer @@ -21,6 +21,7 @@ ARG CRONTAB="" ENV COMPOSER_MEMORY_LIMIT -1 ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} ENV COMPOSER_HOME ${COMPOSER_HOME} +ENV COMPOSER_CLEAR_CACHE false ENV PHP_MEMORY_LIMIT -1 ENV PHP_VALIDATE_TIMESTAMPS 1 ENV DEBUG false @@ -73,9 +74,8 @@ RUN apt-get update \ zip \ && rm -rf /var/lib/apt/lists/* -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml +# Install Python packages +RUN pip3 install --upgrade setuptools && pip3 install pyyaml # Install Grunt RUN npm install -g grunt-cli @@ -164,6 +164,15 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium +RUN cd /tmp \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ + && export PHP_EXT_DIR=$(php-config --extension-dir) \ + && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ + && rm -rf ./ioncube \ + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/8.1-cli/docker-entrypoint.sh b/images/php/8.1-cli/docker-entrypoint.sh index 1e025ca7..ee380b80 100644 --- a/images/php/8.1-cli/docker-entrypoint.sh +++ b/images/php/8.1-cli/docker-entrypoint.sh @@ -17,6 +17,10 @@ if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; the ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} fi +# Clear composer cache if needed +[ "$COMPOSER_CLEAR_CACHE" = "true" ] && \ + composer clearcache + # Configure composer [ ! -z "${COMPOSER_VERSION}" ] && \ composer self-update $COMPOSER_VERSION diff --git a/images/php/8.1-fpm/Dockerfile b/images/php/8.1-fpm/Dockerfile index bb188c99..f9f544dd 100644 --- a/images/php/8.1-fpm/Dockerfile +++ b/images/php/8.1-fpm/Dockerfile @@ -139,6 +139,15 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium +RUN cd /tmp \ + && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ + && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ + && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ + && export PHP_EXT_DIR=$(php-config --extension-dir) \ + && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ + && rm -rf ./ioncube \ + && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/8.0-cli/Dockerfile b/images/php/8.2-cli/Dockerfile similarity index 83% rename from images/php/8.0-cli/Dockerfile rename to images/php/8.2-cli/Dockerfile index e00a862f..54e8f1a6 100644 --- a/images/php/8.0-cli/Dockerfile +++ b/images/php/8.2-cli/Dockerfile @@ -10,9 +10,9 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:8.0.14-cli +FROM php:8.2-cli -ARG COMPOSER_VERSION=2.1.14 +ARG COMPOSER_VERSION=2.2.23 ARG MAGENTO_ROOT=/app ARG COMPOSER_ALLOW_SUPERUSER=1 ARG COMPOSER_HOME=/composer @@ -21,6 +21,7 @@ ARG CRONTAB="" ENV COMPOSER_MEMORY_LIMIT -1 ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} ENV COMPOSER_HOME ${COMPOSER_HOME} +ENV COMPOSER_CLEAR_CACHE false ENV PHP_MEMORY_LIMIT -1 ENV PHP_VALIDATE_TIMESTAMPS 1 ENV DEBUG false @@ -28,7 +29,7 @@ ENV MAGENTO_RUN_MODE production ENV SENDMAIL_PATH /dev/null ENV PHPRC ${MAGENTO_ROOT}/php.ini -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl ftp # Configure Node.js version RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash @@ -71,11 +72,11 @@ RUN apt-get update \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml +# Install Python packages + # Install Grunt RUN npm install -g grunt-cli @@ -113,7 +114,8 @@ RUN docker-php-ext-install -j$(nproc) \ tidy \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ gnupg \ @@ -123,7 +125,7 @@ RUN pecl install -o -f \ pcov \ raphf \ redis \ - xdebug-3.1.2 \ + xdebug-3.2.0 \ xmlrpc-1.0.0RC3 \ yaml @@ -135,23 +137,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -206,4 +191,4 @@ WORKDIR ${MAGENTO_ROOT} USER root -CMD ["bash"] +CMD ["bash"] \ No newline at end of file diff --git a/images/php/7.2-cli/bin/cloud-build b/images/php/8.2-cli/bin/cloud-build similarity index 100% rename from images/php/7.2-cli/bin/cloud-build rename to images/php/8.2-cli/bin/cloud-build diff --git a/images/php/7.2-cli/bin/cloud-deploy b/images/php/8.2-cli/bin/cloud-deploy similarity index 100% rename from images/php/7.2-cli/bin/cloud-deploy rename to images/php/8.2-cli/bin/cloud-deploy diff --git a/images/php/7.2-cli/bin/cloud-post-deploy b/images/php/8.2-cli/bin/cloud-post-deploy similarity index 100% rename from images/php/7.2-cli/bin/cloud-post-deploy rename to images/php/8.2-cli/bin/cloud-post-deploy diff --git a/images/php/7.2-cli/bin/ece-command b/images/php/8.2-cli/bin/ece-command similarity index 100% rename from images/php/7.2-cli/bin/ece-command rename to images/php/8.2-cli/bin/ece-command diff --git a/images/php/7.2-cli/bin/magento-command b/images/php/8.2-cli/bin/magento-command similarity index 100% rename from images/php/7.2-cli/bin/magento-command rename to images/php/8.2-cli/bin/magento-command diff --git a/images/php/7.2-cli/bin/magento-installer b/images/php/8.2-cli/bin/magento-installer similarity index 100% rename from images/php/7.2-cli/bin/magento-installer rename to images/php/8.2-cli/bin/magento-installer diff --git a/images/php/7.2-cli/bin/mftf-command b/images/php/8.2-cli/bin/mftf-command similarity index 100% rename from images/php/7.2-cli/bin/mftf-command rename to images/php/8.2-cli/bin/mftf-command diff --git a/images/php/7.2-cli/bin/run-cron b/images/php/8.2-cli/bin/run-cron similarity index 100% rename from images/php/7.2-cli/bin/run-cron rename to images/php/8.2-cli/bin/run-cron diff --git a/images/php/7.2-cli/bin/run-hooks b/images/php/8.2-cli/bin/run-hooks similarity index 100% rename from images/php/7.2-cli/bin/run-hooks rename to images/php/8.2-cli/bin/run-hooks diff --git a/images/php/7.4-cli/docker-entrypoint.sh b/images/php/8.2-cli/docker-entrypoint.sh similarity index 89% rename from images/php/7.4-cli/docker-entrypoint.sh rename to images/php/8.2-cli/docker-entrypoint.sh index 1e025ca7..ee380b80 100644 --- a/images/php/7.4-cli/docker-entrypoint.sh +++ b/images/php/8.2-cli/docker-entrypoint.sh @@ -17,6 +17,10 @@ if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; the ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} fi +# Clear composer cache if needed +[ "$COMPOSER_CLEAR_CACHE" = "true" ] && \ + composer clearcache + # Configure composer [ ! -z "${COMPOSER_VERSION}" ] && \ composer self-update $COMPOSER_VERSION diff --git a/images/php/7.2-cli/etc/mail.ini b/images/php/8.2-cli/etc/mail.ini similarity index 100% rename from images/php/7.2-cli/etc/mail.ini rename to images/php/8.2-cli/etc/mail.ini diff --git a/images/php/7.2-cli/etc/php-cli.ini b/images/php/8.2-cli/etc/php-cli.ini similarity index 100% rename from images/php/7.2-cli/etc/php-cli.ini rename to images/php/8.2-cli/etc/php-cli.ini diff --git a/images/php/7.2-cli/etc/php-gnupg.ini b/images/php/8.2-cli/etc/php-gnupg.ini similarity index 100% rename from images/php/7.2-cli/etc/php-gnupg.ini rename to images/php/8.2-cli/etc/php-gnupg.ini diff --git a/images/php/7.2-cli/etc/php-pcov.ini b/images/php/8.2-cli/etc/php-pcov.ini similarity index 100% rename from images/php/7.2-cli/etc/php-pcov.ini rename to images/php/8.2-cli/etc/php-pcov.ini diff --git a/images/php/7.2-cli/etc/php-xdebug.ini b/images/php/8.2-cli/etc/php-xdebug.ini similarity index 100% rename from images/php/7.2-cli/etc/php-xdebug.ini rename to images/php/8.2-cli/etc/php-xdebug.ini diff --git a/images/php/8.0-fpm/Dockerfile b/images/php/8.2-fpm/Dockerfile similarity index 81% rename from images/php/8.0-fpm/Dockerfile rename to images/php/8.2-fpm/Dockerfile index c97994d6..9a3a83da 100644 --- a/images/php/8.0-fpm/Dockerfile +++ b/images/php/8.2-fpm/Dockerfile @@ -10,7 +10,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:8.0.14-fpm +FROM php:8.2-fpm ARG MAGENTO_ROOT=/app @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M ENV SENDMAIL_PATH /dev/null ENV PHPRC ${MAGENTO_ROOT}/php.ini -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl ftp # Install dependencies RUN apt-get update \ @@ -53,6 +53,7 @@ RUN apt-get update \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* # Install MailHog @@ -88,7 +89,8 @@ RUN docker-php-ext-install -j$(nproc) \ tidy \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ gnupg \ @@ -98,7 +100,7 @@ RUN pecl install -o -f \ pcov \ raphf \ redis \ - xdebug-3.1.2 \ + xdebug-3.2.0 \ xmlrpc-1.0.0RC3 \ yaml @@ -110,23 +112,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -164,4 +149,4 @@ WORKDIR ${MAGENTO_ROOT} USER root -CMD ["php-fpm", "-R"] +CMD ["php-fpm", "-R"] \ No newline at end of file diff --git a/images/php/7.2-fpm/docker-entrypoint.sh b/images/php/8.2-fpm/docker-entrypoint.sh similarity index 100% rename from images/php/7.2-fpm/docker-entrypoint.sh rename to images/php/8.2-fpm/docker-entrypoint.sh diff --git a/images/php/7.2-fpm/etc/mail.ini b/images/php/8.2-fpm/etc/mail.ini similarity index 100% rename from images/php/7.2-fpm/etc/mail.ini rename to images/php/8.2-fpm/etc/mail.ini diff --git a/images/php/7.2-fpm/etc/php-fpm.conf b/images/php/8.2-fpm/etc/php-fpm.conf similarity index 100% rename from images/php/7.2-fpm/etc/php-fpm.conf rename to images/php/8.2-fpm/etc/php-fpm.conf diff --git a/images/php/7.2-fpm/etc/php-fpm.ini b/images/php/8.2-fpm/etc/php-fpm.ini similarity index 100% rename from images/php/7.2-fpm/etc/php-fpm.ini rename to images/php/8.2-fpm/etc/php-fpm.ini diff --git a/images/php/7.2-fpm/etc/php-gnupg.ini b/images/php/8.2-fpm/etc/php-gnupg.ini similarity index 100% rename from images/php/7.2-fpm/etc/php-gnupg.ini rename to images/php/8.2-fpm/etc/php-gnupg.ini diff --git a/images/php/7.2-fpm/etc/php-pcov.ini b/images/php/8.2-fpm/etc/php-pcov.ini similarity index 100% rename from images/php/7.2-fpm/etc/php-pcov.ini rename to images/php/8.2-fpm/etc/php-pcov.ini diff --git a/images/php/7.2-fpm/etc/php-xdebug.ini b/images/php/8.2-fpm/etc/php-xdebug.ini similarity index 100% rename from images/php/7.2-fpm/etc/php-xdebug.ini rename to images/php/8.2-fpm/etc/php-xdebug.ini diff --git a/images/php/7.4-cli/Dockerfile b/images/php/8.3-cli/Dockerfile similarity index 74% rename from images/php/7.4-cli/Dockerfile rename to images/php/8.3-cli/Dockerfile index 108426f4..d4154a5f 100644 --- a/images/php/7.4-cli/Dockerfile +++ b/images/php/8.3-cli/Dockerfile @@ -10,9 +10,9 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:7.4-cli +FROM php:8.3-cli -ARG COMPOSER_VERSION=1.10.22 +ARG COMPOSER_VERSION=2.7.0 ARG MAGENTO_ROOT=/app ARG COMPOSER_ALLOW_SUPERUSER=1 ARG COMPOSER_HOME=/composer @@ -21,6 +21,7 @@ ARG CRONTAB="" ENV COMPOSER_MEMORY_LIMIT -1 ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} ENV COMPOSER_HOME ${COMPOSER_HOME} +ENV COMPOSER_CLEAR_CACHE false ENV PHP_MEMORY_LIMIT -1 ENV PHP_VALIDATE_TIMESTAMPS 1 ENV DEBUG false @@ -28,7 +29,7 @@ ENV MAGENTO_RUN_MODE production ENV SENDMAIL_PATH /dev/null ENV PHPRC ${MAGENTO_ROOT}/php.ini -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl ftp # Configure Node.js version RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash @@ -60,25 +61,22 @@ RUN apt-get update \ libjpeg62-turbo-dev \ libpng-dev \ libfreetype6-dev \ - libgeoip-dev \ - wget \ libgmp-dev \ libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ libicu-dev \ libldap2-dev \ + libpcre3-dev \ libpspell-dev \ libtidy-dev \ libxslt1-dev \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml +# Install Python packages + # Install Grunt RUN npm install -g grunt-cli @@ -114,24 +112,21 @@ RUN docker-php-ext-install -j$(nproc) \ sysvsem \ sysvshm \ tidy \ - xmlrpc \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ - geoip-1.1.1 \ gnupg \ - igbinary \ - imagick \ mailparse \ msgpack \ oauth \ pcov \ - propro \ raphf \ redis \ - xdebug-3.1.2 \ + xdebug-3.3.0 \ + xmlrpc-1.0.0RC3 \ yaml RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ @@ -142,23 +137,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -171,15 +149,6 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini @@ -222,4 +191,4 @@ WORKDIR ${MAGENTO_ROOT} USER root -CMD ["bash"] +CMD ["bash"] \ No newline at end of file diff --git a/images/php/7.3-cli/bin/cloud-build b/images/php/8.3-cli/bin/cloud-build similarity index 100% rename from images/php/7.3-cli/bin/cloud-build rename to images/php/8.3-cli/bin/cloud-build diff --git a/images/php/7.3-cli/bin/cloud-deploy b/images/php/8.3-cli/bin/cloud-deploy similarity index 100% rename from images/php/7.3-cli/bin/cloud-deploy rename to images/php/8.3-cli/bin/cloud-deploy diff --git a/images/php/7.3-cli/bin/cloud-post-deploy b/images/php/8.3-cli/bin/cloud-post-deploy similarity index 100% rename from images/php/7.3-cli/bin/cloud-post-deploy rename to images/php/8.3-cli/bin/cloud-post-deploy diff --git a/images/php/7.3-cli/bin/ece-command b/images/php/8.3-cli/bin/ece-command similarity index 100% rename from images/php/7.3-cli/bin/ece-command rename to images/php/8.3-cli/bin/ece-command diff --git a/images/php/7.3-cli/bin/magento-command b/images/php/8.3-cli/bin/magento-command similarity index 100% rename from images/php/7.3-cli/bin/magento-command rename to images/php/8.3-cli/bin/magento-command diff --git a/images/php/7.3-cli/bin/magento-installer b/images/php/8.3-cli/bin/magento-installer similarity index 100% rename from images/php/7.3-cli/bin/magento-installer rename to images/php/8.3-cli/bin/magento-installer diff --git a/images/php/7.3-cli/bin/mftf-command b/images/php/8.3-cli/bin/mftf-command similarity index 100% rename from images/php/7.3-cli/bin/mftf-command rename to images/php/8.3-cli/bin/mftf-command diff --git a/images/php/7.3-cli/bin/run-cron b/images/php/8.3-cli/bin/run-cron similarity index 100% rename from images/php/7.3-cli/bin/run-cron rename to images/php/8.3-cli/bin/run-cron diff --git a/images/php/7.3-cli/bin/run-hooks b/images/php/8.3-cli/bin/run-hooks similarity index 100% rename from images/php/7.3-cli/bin/run-hooks rename to images/php/8.3-cli/bin/run-hooks diff --git a/images/php/8.0-cli/docker-entrypoint.sh b/images/php/8.3-cli/docker-entrypoint.sh similarity index 89% rename from images/php/8.0-cli/docker-entrypoint.sh rename to images/php/8.3-cli/docker-entrypoint.sh index 1e025ca7..ee380b80 100644 --- a/images/php/8.0-cli/docker-entrypoint.sh +++ b/images/php/8.3-cli/docker-entrypoint.sh @@ -17,6 +17,10 @@ if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; the ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} fi +# Clear composer cache if needed +[ "$COMPOSER_CLEAR_CACHE" = "true" ] && \ + composer clearcache + # Configure composer [ ! -z "${COMPOSER_VERSION}" ] && \ composer self-update $COMPOSER_VERSION diff --git a/images/php/7.3-cli/etc/mail.ini b/images/php/8.3-cli/etc/mail.ini similarity index 100% rename from images/php/7.3-cli/etc/mail.ini rename to images/php/8.3-cli/etc/mail.ini diff --git a/images/php/7.3-cli/etc/php-cli.ini b/images/php/8.3-cli/etc/php-cli.ini similarity index 100% rename from images/php/7.3-cli/etc/php-cli.ini rename to images/php/8.3-cli/etc/php-cli.ini diff --git a/images/php/7.3-cli/etc/php-gnupg.ini b/images/php/8.3-cli/etc/php-gnupg.ini similarity index 100% rename from images/php/7.3-cli/etc/php-gnupg.ini rename to images/php/8.3-cli/etc/php-gnupg.ini diff --git a/images/php/7.3-cli/etc/php-pcov.ini b/images/php/8.3-cli/etc/php-pcov.ini similarity index 100% rename from images/php/7.3-cli/etc/php-pcov.ini rename to images/php/8.3-cli/etc/php-pcov.ini diff --git a/images/php/7.3-cli/etc/php-xdebug.ini b/images/php/8.3-cli/etc/php-xdebug.ini similarity index 100% rename from images/php/7.3-cli/etc/php-xdebug.ini rename to images/php/8.3-cli/etc/php-xdebug.ini diff --git a/images/php/7.4-fpm/Dockerfile b/images/php/8.3-fpm/Dockerfile similarity index 70% rename from images/php/7.4-fpm/Dockerfile rename to images/php/8.3-fpm/Dockerfile index 2c085a62..d1342ab1 100644 --- a/images/php/7.4-fpm/Dockerfile +++ b/images/php/8.3-fpm/Dockerfile @@ -10,7 +10,7 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:7.4-fpm +FROM php:8.3-fpm ARG MAGENTO_ROOT=/app @@ -22,7 +22,7 @@ ENV UPLOAD_MAX_FILESIZE 64M ENV SENDMAIL_PATH /dev/null ENV PHPRC ${MAGENTO_ROOT}/php.ini -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl ftp # Install dependencies RUN apt-get update \ @@ -42,20 +42,18 @@ RUN apt-get update \ libjpeg62-turbo-dev \ libpng-dev \ libfreetype6-dev \ - libgeoip-dev \ - wget \ libgmp-dev \ libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ libicu-dev \ libldap2-dev \ + libpcre3-dev \ libpspell-dev \ libtidy-dev \ libxslt1-dev \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* # Install MailHog @@ -89,24 +87,21 @@ RUN docker-php-ext-install -j$(nproc) \ sysvsem \ sysvshm \ tidy \ - xmlrpc \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ - geoip-1.1.1 \ gnupg \ - igbinary \ - imagick \ mailparse \ msgpack \ oauth \ pcov \ - propro \ raphf \ redis \ - xdebug-3.1.2 \ + xdebug-3.3.0 \ + xmlrpc-1.0.0RC3 \ yaml RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ @@ -117,23 +112,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -146,15 +124,6 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini @@ -180,4 +149,4 @@ WORKDIR ${MAGENTO_ROOT} USER root -CMD ["php-fpm", "-R"] +CMD ["php-fpm", "-R"] \ No newline at end of file diff --git a/images/php/7.3-fpm/docker-entrypoint.sh b/images/php/8.3-fpm/docker-entrypoint.sh similarity index 100% rename from images/php/7.3-fpm/docker-entrypoint.sh rename to images/php/8.3-fpm/docker-entrypoint.sh diff --git a/images/php/7.3-fpm/etc/mail.ini b/images/php/8.3-fpm/etc/mail.ini similarity index 100% rename from images/php/7.3-fpm/etc/mail.ini rename to images/php/8.3-fpm/etc/mail.ini diff --git a/images/php/7.3-fpm/etc/php-fpm.conf b/images/php/8.3-fpm/etc/php-fpm.conf similarity index 100% rename from images/php/7.3-fpm/etc/php-fpm.conf rename to images/php/8.3-fpm/etc/php-fpm.conf diff --git a/images/php/7.3-fpm/etc/php-fpm.ini b/images/php/8.3-fpm/etc/php-fpm.ini similarity index 100% rename from images/php/7.3-fpm/etc/php-fpm.ini rename to images/php/8.3-fpm/etc/php-fpm.ini diff --git a/images/php/7.3-fpm/etc/php-gnupg.ini b/images/php/8.3-fpm/etc/php-gnupg.ini similarity index 100% rename from images/php/7.3-fpm/etc/php-gnupg.ini rename to images/php/8.3-fpm/etc/php-gnupg.ini diff --git a/images/php/7.3-fpm/etc/php-pcov.ini b/images/php/8.3-fpm/etc/php-pcov.ini similarity index 100% rename from images/php/7.3-fpm/etc/php-pcov.ini rename to images/php/8.3-fpm/etc/php-pcov.ini diff --git a/images/php/7.3-fpm/etc/php-xdebug.ini b/images/php/8.3-fpm/etc/php-xdebug.ini similarity index 100% rename from images/php/7.3-fpm/etc/php-xdebug.ini rename to images/php/8.3-fpm/etc/php-xdebug.ini diff --git a/images/php/7.3-cli/Dockerfile b/images/php/8.4-cli/Dockerfile similarity index 65% rename from images/php/7.3-cli/Dockerfile rename to images/php/8.4-cli/Dockerfile index 065b9b45..d04d9411 100644 --- a/images/php/7.3-cli/Dockerfile +++ b/images/php/8.4-cli/Dockerfile @@ -10,25 +10,47 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:7.3-cli +FROM php:8.4-cli -ARG COMPOSER_VERSION=1.10.22 +ARG COMPOSER_VERSION=2.8.4 ARG MAGENTO_ROOT=/app ARG COMPOSER_ALLOW_SUPERUSER=1 ARG COMPOSER_HOME=/composer ARG CRONTAB="" -ENV COMPOSER_MEMORY_LIMIT -1 -ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} -ENV COMPOSER_HOME ${COMPOSER_HOME} -ENV PHP_MEMORY_LIMIT -1 -ENV PHP_VALIDATE_TIMESTAMPS 1 -ENV DEBUG false -ENV MAGENTO_RUN_MODE production -ENV SENDMAIL_PATH /dev/null -ENV PHPRC ${MAGENTO_ROOT}/php.ini - -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV COMPOSER_MEMORY_LIMIT=-1 +ENV COMPOSER_ALLOW_SUPERUSER=${COMPOSER_ALLOW_SUPERUSER} +ENV COMPOSER_HOME=${COMPOSER_HOME} +ENV COMPOSER_CLEAR_CACHE=false +ENV PHP_MEMORY_LIMIT=-1 +ENV PHP_VALIDATE_TIMESTAMPS=1 +ENV DEBUG=false +ENV MAGENTO_RUN_MODE=production +ENV SENDMAIL_PATH=/dev/null +ENV PHPRC=${MAGENTO_ROOT}/php.ini + +ENV PHP_EXTENSIONS="\ + bcmath \ + bz2 \ + calendar \ + exif \ + gd \ + gettext \ + intl \ + mysqli \ + opcache \ + pdo_mysql \ + redis \ + soap \ + sockets \ + sodium \ + sysvmsg \ + sysvsem \ + sysvshm \ + xsl \ + zip \ + pcntl \ + ftp" # Configure Node.js version RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash @@ -60,29 +82,22 @@ RUN apt-get update \ libjpeg62-turbo-dev \ libpng-dev \ libfreetype6-dev \ - libgeoip-dev \ - wget \ libgmp-dev \ libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ - libc-client-dev \ - libkrb5-dev \ libicu-dev \ libldap2-dev \ + libpcre3-dev \ libpspell-dev \ - librecode0 \ - librecode-dev \ libtidy-dev \ libxslt1-dev \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml +# Install Python packages + # Install Grunt RUN npm install -g grunt-cli @@ -93,13 +108,9 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ - gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-configure \ - imap --with-kerberos --with-imap-ssl + gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ RUN docker-php-ext-configure \ opcache --enable-opcache -RUN docker-php-ext-configure \ - zip --with-libzip # Install required PHP extensions RUN docker-php-ext-install -j$(nproc) \ @@ -110,13 +121,10 @@ RUN docker-php-ext-install -j$(nproc) \ gd \ gettext \ gmp \ - imap \ intl \ mysqli \ opcache \ pdo_mysql \ - pspell \ - recode \ shmop \ soap \ sockets \ @@ -124,25 +132,23 @@ RUN docker-php-ext-install -j$(nproc) \ sysvsem \ sysvshm \ tidy \ - xmlrpc \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ - geoip-1.1.1 \ gnupg \ - igbinary \ - imagick \ mailparse \ msgpack \ oauth \ pcov \ - propro \ raphf \ redis \ - xdebug-3.1.2 \ - yaml + xdebug-3.4.0 \ + xmlrpc-1.0.0RC3 \ + yaml \ + pspell RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ @@ -152,23 +158,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -181,15 +170,6 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz ADD etc/php-cli.ini /usr/local/etc/php/conf.d/zz-magento.ini ADD etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/7.4-cli/bin/cloud-build b/images/php/8.4-cli/bin/cloud-build similarity index 100% rename from images/php/7.4-cli/bin/cloud-build rename to images/php/8.4-cli/bin/cloud-build diff --git a/images/php/7.4-cli/bin/cloud-deploy b/images/php/8.4-cli/bin/cloud-deploy similarity index 100% rename from images/php/7.4-cli/bin/cloud-deploy rename to images/php/8.4-cli/bin/cloud-deploy diff --git a/images/php/7.4-cli/bin/cloud-post-deploy b/images/php/8.4-cli/bin/cloud-post-deploy similarity index 100% rename from images/php/7.4-cli/bin/cloud-post-deploy rename to images/php/8.4-cli/bin/cloud-post-deploy diff --git a/images/php/7.4-cli/bin/ece-command b/images/php/8.4-cli/bin/ece-command similarity index 100% rename from images/php/7.4-cli/bin/ece-command rename to images/php/8.4-cli/bin/ece-command diff --git a/images/php/7.4-cli/bin/magento-command b/images/php/8.4-cli/bin/magento-command similarity index 100% rename from images/php/7.4-cli/bin/magento-command rename to images/php/8.4-cli/bin/magento-command diff --git a/images/php/7.4-cli/bin/magento-installer b/images/php/8.4-cli/bin/magento-installer similarity index 100% rename from images/php/7.4-cli/bin/magento-installer rename to images/php/8.4-cli/bin/magento-installer diff --git a/images/php/7.4-cli/bin/mftf-command b/images/php/8.4-cli/bin/mftf-command similarity index 100% rename from images/php/7.4-cli/bin/mftf-command rename to images/php/8.4-cli/bin/mftf-command diff --git a/images/php/7.4-cli/bin/run-cron b/images/php/8.4-cli/bin/run-cron similarity index 100% rename from images/php/7.4-cli/bin/run-cron rename to images/php/8.4-cli/bin/run-cron diff --git a/images/php/7.4-cli/bin/run-hooks b/images/php/8.4-cli/bin/run-hooks similarity index 100% rename from images/php/7.4-cli/bin/run-hooks rename to images/php/8.4-cli/bin/run-hooks diff --git a/images/php/7.2-cli/docker-entrypoint.sh b/images/php/8.4-cli/docker-entrypoint.sh similarity index 89% rename from images/php/7.2-cli/docker-entrypoint.sh rename to images/php/8.4-cli/docker-entrypoint.sh index 1e025ca7..ee380b80 100644 --- a/images/php/7.2-cli/docker-entrypoint.sh +++ b/images/php/8.4-cli/docker-entrypoint.sh @@ -17,6 +17,10 @@ if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; the ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} fi +# Clear composer cache if needed +[ "$COMPOSER_CLEAR_CACHE" = "true" ] && \ + composer clearcache + # Configure composer [ ! -z "${COMPOSER_VERSION}" ] && \ composer self-update $COMPOSER_VERSION diff --git a/images/php/7.4-cli/etc/mail.ini b/images/php/8.4-cli/etc/mail.ini similarity index 100% rename from images/php/7.4-cli/etc/mail.ini rename to images/php/8.4-cli/etc/mail.ini diff --git a/images/php/7.4-cli/etc/php-cli.ini b/images/php/8.4-cli/etc/php-cli.ini similarity index 100% rename from images/php/7.4-cli/etc/php-cli.ini rename to images/php/8.4-cli/etc/php-cli.ini diff --git a/images/php/7.4-cli/etc/php-gnupg.ini b/images/php/8.4-cli/etc/php-gnupg.ini similarity index 100% rename from images/php/7.4-cli/etc/php-gnupg.ini rename to images/php/8.4-cli/etc/php-gnupg.ini diff --git a/images/php/7.4-cli/etc/php-pcov.ini b/images/php/8.4-cli/etc/php-pcov.ini similarity index 100% rename from images/php/7.4-cli/etc/php-pcov.ini rename to images/php/8.4-cli/etc/php-pcov.ini diff --git a/images/php/7.4-cli/etc/php-xdebug.ini b/images/php/8.4-cli/etc/php-xdebug.ini similarity index 100% rename from images/php/7.4-cli/etc/php-xdebug.ini rename to images/php/8.4-cli/etc/php-xdebug.ini diff --git a/images/php/7.3-fpm/Dockerfile b/images/php/8.4-fpm/Dockerfile similarity index 61% rename from images/php/7.3-fpm/Dockerfile rename to images/php/8.4-fpm/Dockerfile index 39e6c977..1e610bef 100644 --- a/images/php/7.3-fpm/Dockerfile +++ b/images/php/8.4-fpm/Dockerfile @@ -10,19 +10,40 @@ RUN if [ $(uname -m) = "x86_64" ]; then mailhog_arch="amd64"; else mailhog_arch= && go get . \ && GOOS=linux GOARCH=${mailhog_arch} go build -o mhsendmail . -FROM php:7.3-fpm +FROM php:8.4-fpm ARG MAGENTO_ROOT=/app -ENV PHP_MEMORY_LIMIT 2G -ENV PHP_VALIDATE_TIMESTAMPS 1 -ENV DEBUG false -ENV MAGENTO_RUN_MODE production -ENV UPLOAD_MAX_FILESIZE 64M -ENV SENDMAIL_PATH /dev/null -ENV PHPRC ${MAGENTO_ROOT}/php.ini +ENV PHP_MEMORY_LIMIT=2G +ENV PHP_VALIDATE_TIMESTAMPS=1 +ENV DEBUG=false +ENV MAGENTO_RUN_MODE=production +ENV UPLOAD_MAX_FILESIZE=64M +ENV SENDMAIL_PATH=/dev/null +ENV PHPRC=${MAGENTO_ROOT}/php.ini -ENV PHP_EXTENSIONS bcmath bz2 calendar exif gd gettext intl mysqli opcache pdo_mysql redis soap sockets sodium sysvmsg sysvsem sysvshm xsl zip pcntl +ENV PHP_EXTENSIONS="\ + bcmath \ + bz2 \ + calendar \ + exif \ + gd \ + gettext \ + intl \ + mysqli \ + opcache \ + pdo_mysql \ + redis \ + soap \ + sockets \ + sodium \ + sysvmsg \ + sysvsem \ + sysvshm \ + xsl \ + zip \ + pcntl \ + ftp" # Install dependencies RUN apt-get update \ @@ -42,24 +63,18 @@ RUN apt-get update \ libjpeg62-turbo-dev \ libpng-dev \ libfreetype6-dev \ - libgeoip-dev \ - wget \ libgmp-dev \ libgpgme11-dev \ - libmagickwand-dev \ - libmagickcore-dev \ - libc-client-dev \ - libkrb5-dev \ libicu-dev \ libldap2-dev \ + libpcre3-dev \ libpspell-dev \ - librecode0 \ - librecode-dev \ libtidy-dev \ libxslt1-dev \ libyaml-dev \ libzip-dev \ zip \ + python3-yaml \ && rm -rf /var/lib/apt/lists/* # Install MailHog @@ -68,13 +83,9 @@ RUN sudo chmod +x /usr/local/bin/mhsendmail # Configure the gd library RUN docker-php-ext-configure \ - gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ -RUN docker-php-ext-configure \ - imap --with-kerberos --with-imap-ssl + gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ RUN docker-php-ext-configure \ opcache --enable-opcache -RUN docker-php-ext-configure \ - zip --with-libzip # Install required PHP extensions RUN docker-php-ext-install -j$(nproc) \ @@ -85,13 +96,10 @@ RUN docker-php-ext-install -j$(nproc) \ gd \ gettext \ gmp \ - imap \ intl \ mysqli \ opcache \ pdo_mysql \ - pspell \ - recode \ shmop \ soap \ sockets \ @@ -99,25 +107,23 @@ RUN docker-php-ext-install -j$(nproc) \ sysvsem \ sysvshm \ tidy \ - xmlrpc \ xsl \ zip \ - pcntl + pcntl \ + ftp RUN pecl install -o -f \ - geoip-1.1.1 \ gnupg \ - igbinary \ - imagick \ mailparse \ msgpack \ oauth \ pcov \ - propro \ raphf \ redis \ - xdebug-3.1.2 \ - yaml + xdebug-3.4.0 \ + xmlrpc-1.0.0RC3 \ + yaml \ + pspell RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io-archive-keyring.gpg \ && install -o root -g root -m 644 blackfire.io-archive-keyring.gpg /etc/apt/trusted.gpg.d/ \ @@ -127,23 +133,6 @@ RUN curl -L https://packages.blackfire.io/gpg.key | gpg --dearmor > blackfire.io && rm -rf /var/lib/apt/lists/* RUN if [ $(uname -m) = "x86_64" ]; then ldap_arch="x86_64-linux-gnu"; else ldap_arch="aarch64-linux-gnu"; fi \ && docker-php-ext-configure ldap --with-libdir=lib/${ldap_arch} -RUN mkdir -p /tmp/zoo \ - && cd /tmp/zoo \ - && git clone https://github.com/php-zookeeper/php-zookeeper.git \ - && curl -LO https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz \ - && tar -xf zookeeper-3.4.14.tar.gz \ - && cp zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/generated/zookeeper.jute.h zookeeper-3.4.14/zookeeper-client/zookeeper-client-c/include \ - && cd zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && ./configure \ - && sed -i 's/CFLAGS = -g -O2 -D_GNU_SOURCE/CFLAGS = -g -O2 -D_GNU_SOURCE -Wno-error=format-overflow -Wno-error=stringop-truncation/g' Makefile \ - && make \ - && make install \ - && ldconfig \ - && cd /tmp/zoo/php-zookeeper \ - && phpize \ - && ./configure --with-libzookeeper-dir=../zookeeper-3.4.14/zookeeper-client/zookeeper-client-c \ - && make \ - && make install RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && rm -f /usr/local/lib/php/extensions/*/*sodium.so \ && apt-get remove libsodium* -y \ @@ -156,15 +145,6 @@ RUN rm -f /usr/local/etc/php/conf.d/*sodium.ini \ && cd / \ && rm -rf /tmp/libsodium \ && pecl install -o -f libsodium -RUN cd /tmp \ - && if [ $(uname -m) = "x86_64" ]; then ioncube_arch="x86-64"; else ioncube_arch="aarch64"; fi \ - && curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && tar zxvf ioncube_loaders_lin_${ioncube_arch}.tar.gz \ - && export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") \ - && export PHP_EXT_DIR=$(php-config --extension-dir) \ - && cp "./ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so" \ - && rm -rf ./ioncube \ - && rm ioncube_loaders_lin_${ioncube_arch}.tar.gz COPY etc/php-fpm.ini /usr/local/etc/php/conf.d/zz-magento.ini COPY etc/php-xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug-settings.ini diff --git a/images/php/7.4-fpm/docker-entrypoint.sh b/images/php/8.4-fpm/docker-entrypoint.sh similarity index 100% rename from images/php/7.4-fpm/docker-entrypoint.sh rename to images/php/8.4-fpm/docker-entrypoint.sh diff --git a/images/php/7.4-fpm/etc/mail.ini b/images/php/8.4-fpm/etc/mail.ini similarity index 100% rename from images/php/7.4-fpm/etc/mail.ini rename to images/php/8.4-fpm/etc/mail.ini diff --git a/images/php/7.4-fpm/etc/php-fpm.conf b/images/php/8.4-fpm/etc/php-fpm.conf similarity index 100% rename from images/php/7.4-fpm/etc/php-fpm.conf rename to images/php/8.4-fpm/etc/php-fpm.conf diff --git a/images/php/7.4-fpm/etc/php-fpm.ini b/images/php/8.4-fpm/etc/php-fpm.ini similarity index 100% rename from images/php/7.4-fpm/etc/php-fpm.ini rename to images/php/8.4-fpm/etc/php-fpm.ini diff --git a/images/php/7.4-fpm/etc/php-gnupg.ini b/images/php/8.4-fpm/etc/php-gnupg.ini similarity index 100% rename from images/php/7.4-fpm/etc/php-gnupg.ini rename to images/php/8.4-fpm/etc/php-gnupg.ini diff --git a/images/php/7.4-fpm/etc/php-pcov.ini b/images/php/8.4-fpm/etc/php-pcov.ini similarity index 100% rename from images/php/7.4-fpm/etc/php-pcov.ini rename to images/php/8.4-fpm/etc/php-pcov.ini diff --git a/images/php/7.4-fpm/etc/php-xdebug.ini b/images/php/8.4-fpm/etc/php-xdebug.ini similarity index 100% rename from images/php/7.4-fpm/etc/php-xdebug.ini rename to images/php/8.4-fpm/etc/php-xdebug.ini diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile index b793da07..f42d1d1b 100755 --- a/images/php/cli/Dockerfile +++ b/images/php/cli/Dockerfile @@ -21,6 +21,7 @@ ARG CRONTAB="" ENV COMPOSER_MEMORY_LIMIT -1 ENV COMPOSER_ALLOW_SUPERUSER ${COMPOSER_ALLOW_SUPERUSER} ENV COMPOSER_HOME ${COMPOSER_HOME} +ENV COMPOSER_CLEAR_CACHE false ENV PHP_MEMORY_LIMIT -1 ENV PHP_VALIDATE_TIMESTAMPS 1 ENV DEBUG false @@ -40,9 +41,8 @@ RUN apt-get update \ {%packages%} \ && rm -rf /var/lib/apt/lists/* -# Install PyYAML -RUN pip3 install --upgrade setuptools \ - && pip3 install pyyaml +# Install Python packages +{%python_packages%} # Install Grunt RUN npm install -g grunt-cli diff --git a/images/php/cli/docker-entrypoint.sh b/images/php/cli/docker-entrypoint.sh index 1e025ca7..ee380b80 100755 --- a/images/php/cli/docker-entrypoint.sh +++ b/images/php/cli/docker-entrypoint.sh @@ -17,6 +17,10 @@ if [ -x "$(command -v ${PHP_EXT_COM_ON})" ] && [ ! -z "${PHP_EXTENSIONS}" ]; the ${PHP_EXT_COM_ON} ${PHP_EXTENSIONS} fi +# Clear composer cache if needed +[ "$COMPOSER_CLEAR_CACHE" = "true" ] && \ + composer clearcache + # Configure composer [ ! -z "${COMPOSER_VERSION}" ] && \ composer self-update $COMPOSER_VERSION diff --git a/images/varnish/4.0/Dockerfile b/images/varnish/4.0/Dockerfile deleted file mode 100755 index e6a86a23..00000000 --- a/images/varnish/4.0/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM centos:centos7 - -RUN yum update -y && \ - yum install -y epel-release && \ - yum install -y varnish && \ - yum install -y libmhash-devel && \ - yum clean all - -EXPOSE 80 - -ADD entrypoint.sh /entrypoint.sh - -ENV VCL_CONFIG /data/varnish.vcl -ENV CACHE_SIZE 64m -ENV VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600 -p feature=+esi_ignore_https -p feature=+esi_disable_xml_check - -COPY etc/varnish.vcl /data/varnish.vcl - -RUN ["chmod", "644", "/data/varnish.vcl"] -RUN ["chmod", "+x", "/entrypoint.sh"] - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/images/varnish/4.0/entrypoint.sh b/images/varnish/4.0/entrypoint.sh deleted file mode 100644 index 5ebfaf16..00000000 --- a/images/varnish/4.0/entrypoint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e - -exec bash -c \ - "exec varnishd -F -u varnish -f $VCL_CONFIG -s malloc,$CACHE_SIZE $VARNISHD_PARAMS" diff --git a/images/varnish/7.1.1/Dockerfile b/images/varnish/7.1.1/Dockerfile new file mode 100755 index 00000000..90b5f19a --- /dev/null +++ b/images/varnish/7.1.1/Dockerfile @@ -0,0 +1,3 @@ +FROM varnish:7.1.1 + +COPY etc/default.vcl /etc/varnish/ diff --git a/images/varnish/4.0/etc/varnish.vcl b/images/varnish/7.1.1/etc/default.vcl old mode 100644 new mode 100755 similarity index 100% rename from images/varnish/4.0/etc/varnish.vcl rename to images/varnish/7.1.1/etc/default.vcl diff --git a/src/App/GenericException.php b/src/App/GenericException.php index ca01ea28..76a60efb 100644 --- a/src/App/GenericException.php +++ b/src/App/GenericException.php @@ -17,7 +17,7 @@ class GenericException extends \Exception /** * @inheritDoc */ - public function __construct(string $message, int $code = 0, Throwable $previous = null) + public function __construct(string $message, int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Application.php b/src/Application.php index 2aca8022..b84d81c5 100644 --- a/src/Application.php +++ b/src/Application.php @@ -13,7 +13,7 @@ /** * @inheritdoc * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings("PHPMD.CouplingBetweenObjects") */ class Application extends \Symfony\Component\Console\Application { @@ -35,7 +35,7 @@ public function __construct(ContainerInterface $container) /** * @inheritdoc */ - protected function getDefaultCommands() + protected function getDefaultCommands(): array { return array_merge(parent::getDefaultCommands(), [ $this->container->get(Command\BuildCompose::class), diff --git a/src/Command/BuildCompose.php b/src/Command/BuildCompose.php index bbb6f2e9..1dca9c56 100644 --- a/src/Command/BuildCompose.php +++ b/src/Command/BuildCompose.php @@ -25,7 +25,7 @@ /** * Builds Docker configuration for Magento project. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings("PHPMD.CouplingBetweenObjects") */ class BuildCompose extends Command { @@ -82,7 +82,7 @@ public function __construct( /** * {@inheritdoc} * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings("PHPMD.ExcessiveMethodLength") */ protected function configure(): void { @@ -138,6 +138,11 @@ protected function configure(): void null, InputOption::VALUE_REQUIRED, 'Redis version' + )->addOption( + Source\CliSource::OPTION_VALKEY, + null, + InputOption::VALUE_REQUIRED, + 'Valkey version' )->addOption( Source\CliSource::OPTION_ES, null, @@ -188,6 +193,16 @@ protected function configure(): void null, InputOption::VALUE_NONE, 'Disable Opensearch' + )->addOption( + Source\CliSource::OPTION_NO_REDIS, + null, + InputOption::VALUE_NONE, + 'Disable Redis' + )->addOption( + Source\CliSource::OPTION_NO_DB, + null, + InputOption::VALUE_NONE, + 'Disable Database' )->addOption( Source\CliSource::OPTION_NO_MAILHOG, null, diff --git a/src/Command/BuildCustomCompose.php b/src/Command/BuildCustomCompose.php index b292eba3..f00ce92c 100644 --- a/src/Command/BuildCustomCompose.php +++ b/src/Command/BuildCustomCompose.php @@ -27,7 +27,7 @@ /** * Build configuration from custom-provided source. * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings("PHPMD.CouplingBetweenObjects") */ class BuildCustomCompose extends Command { diff --git a/src/Command/Image/GenerateOs.php b/src/Command/Image/GenerateOs.php index 4b277b02..623c05b1 100644 --- a/src/Command/Image/GenerateOs.php +++ b/src/Command/Image/GenerateOs.php @@ -34,6 +34,21 @@ class GenerateOs extends Command '1.2' => [ 'real-version' => '1.2.1', ], + '1.3' => [ + 'real-version' => '1.3.0', + ], + '2.3' => [ + 'real-version' => '2.3.0' + ], + '2.4' => [ + 'real-version' => '2.4.0' + ], + '2.5' => [ + 'real-version' => '2.5.0' + ], + '2.12' => [ + 'real-version' => '2.12.0' + ] ]; /** diff --git a/src/Command/Image/GeneratePhp.php b/src/Command/Image/GeneratePhp.php index d6dd63c0..fcaf1f6a 100644 --- a/src/Command/Image/GeneratePhp.php +++ b/src/Command/Image/GeneratePhp.php @@ -26,14 +26,14 @@ class GeneratePhp extends Command { private const NAME = 'image:generate:php'; - private const SUPPORTED_VERSIONS = ['7.2', '7.3', '7.4', '8.0', '8.1']; + private const SUPPORTED_VERSIONS = ['8.0', '8.1', '8.2', '8.3', '8.4']; private const VERSION_MAP = [ - '7.2' => '7.2', - '7.3' => '7.3', - '7.4' => '7.4', '8.0' => '8.0.14', - '8.1' => '8.1.1' + '8.1' => '8.1.1', + '8.2' => '8.2', + '8.3' => '8.3', + '8.4' => '8.4' ]; private const EDITION_CLI = 'cli'; @@ -88,7 +88,8 @@ class GeneratePhp extends Command 'opcache', 'xsl', 'zip', - 'sodium' + 'sodium', + 'ftp' ]; private const DOCKERFILE = 'Dockerfile'; @@ -219,9 +220,9 @@ private function build(string $version, string $edition): void * @throws ConfigurationMismatchException * @throws FileNotFoundException * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings("PHPMD.CyclomaticComplexity") + * @SuppressWarnings("PHPMD.NPathComplexity") + * @SuppressWarnings("PHPMD.ExcessiveMethodLength") */ private function buildDockerfile(string $dockerfile, string $phpVersion, string $edition): string { @@ -285,6 +286,13 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string } } + if ($this->semver::satisfies($phpVersion, '>=8.2')) { + $packages[] = 'python3-yaml'; + $pythonPackages = ''; + } else { + $pythonPackages = 'RUN pip3 install --upgrade setuptools && pip3 install pyyaml'; + } + $volumes = [ 'root' => [ 'def' => 'VOLUME ${MAGENTO_ROOT}', @@ -303,9 +311,7 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string [ '{%note%}' => '# This file is automatically generated. Do not edit directly. #', '{%version%}' => self::VERSION_MAP[$phpVersion], - '{%composer_version%}' => $this->semver::satisfies($phpVersion, '<8.0') - ? '1.10.22' - : '2.1.14', + '{%composer_version%}' => $this->getComposerVersion($phpVersion), '{%packages%}' => implode(" \\\n ", array_unique($packages)), '{%docker-php-ext-configure%}' => implode(PHP_EOL, $phpExtCoreConfigOptions), '{%docker-php-ext-install%}' => $phpExtCore @@ -320,9 +326,25 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string '{%env_php_extensions%}' => $phpExtEnabledDefault ? 'ENV PHP_EXTENSIONS ' . implode(' ', $phpExtEnabledDefault) : '', + '{%python_packages%}' => $pythonPackages, '{%volumes_cmd%}' => rtrim($volumesCmd), '{%volumes_def%}' => rtrim($volumesDef) ] ); } + + /** + * @param string $phpVersion + * @return string + */ + private function getComposerVersion(string $phpVersion) : string + { + if ($this->semver::satisfies($phpVersion, '<8.0')) { + return '1.10.22'; + } else if ($this->semver::satisfies($phpVersion, '<=8.2')) { + return '2.2.23'; + } else { + return '2.7.0'; + } + } } diff --git a/src/Compose/BuilderInterface.php b/src/Compose/BuilderInterface.php index ecfba36e..a31a394b 100644 --- a/src/Compose/BuilderInterface.php +++ b/src/Compose/BuilderInterface.php @@ -29,6 +29,7 @@ interface BuilderInterface public const SERVICE_TLS = ServiceInterface::SERVICE_TLS; public const SERVICE_RABBITMQ = ServiceInterface::SERVICE_RABBITMQ; public const SERVICE_REDIS = ServiceInterface::SERVICE_REDIS; + public const SERVICE_VALKEY = ServiceInterface::SERVICE_VALKEY; public const SERVICE_ELASTICSEARCH = ServiceInterface::SERVICE_ELASTICSEARCH; public const SERVICE_OPENSEARCH = ServiceInterface::SERVICE_OPENSEARCH; public const SERVICE_NODE = ServiceInterface::SERVICE_NODE; diff --git a/src/Compose/DeveloperBuilder.php b/src/Compose/DeveloperBuilder.php index 8e2f9874..9ea4d3ce 100644 --- a/src/Compose/DeveloperBuilder.php +++ b/src/Compose/DeveloperBuilder.php @@ -84,7 +84,7 @@ public function __construct( /** * {@inheritDoc} * - * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings("PHPMD.CyclomaticComplexity") */ public function build(Config $config): Manager { diff --git a/src/Compose/Php/ConfigFilesResolver.php b/src/Compose/Php/ConfigFilesResolver.php index a40f0fee..fab1badf 100644 --- a/src/Compose/Php/ConfigFilesResolver.php +++ b/src/Compose/Php/ConfigFilesResolver.php @@ -29,31 +29,31 @@ class ConfigFilesResolver private const CONFIG_FILES = [ 'cli' => [ 'cli' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-cli.ini', self::TO_PATH => 'etc/php-cli.ini', ], ], 'xdebug' => [ - '>=7.2' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-xdebug-3.ini', self::TO_PATH => 'etc/php-xdebug.ini', ], ], 'pcov' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-pcov.ini', self::TO_PATH => 'etc/php-pcov.ini', ], ], 'mail' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/mail.ini', self::TO_PATH => 'etc/mail.ini', ], ], 'gnupg' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-gnupg.ini', self::TO_PATH => 'etc/php-gnupg.ini', ], @@ -61,37 +61,37 @@ class ConfigFilesResolver ], 'fpm' => [ 'fpm' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-fpm.ini', self::TO_PATH => 'etc/php-fpm.ini', ], ], 'xdebug' => [ - '>=7.2' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-xdebug-3.ini', self::TO_PATH => 'etc/php-xdebug.ini', ], ], 'pcov' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-pcov.ini', self::TO_PATH => 'etc/php-pcov.ini', ], ], 'mail' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/mail.ini', self::TO_PATH => 'etc/mail.ini', ], ], 'fpm.conf' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-fpm.conf', self::TO_PATH => 'etc/php-fpm.conf', ], ], 'gnupg' => [ - '>=7.0' => [ + '>=8.0' => [ self::FROM_PATH => 'etc/php-gnupg.ini', self::TO_PATH => 'etc/php-gnupg.ini', ], diff --git a/src/Compose/Php/ExtensionResolver.php b/src/Compose/Php/ExtensionResolver.php index c00f9198..f9a82d0e 100644 --- a/src/Compose/Php/ExtensionResolver.php +++ b/src/Compose/Php/ExtensionResolver.php @@ -50,6 +50,7 @@ class ExtensionResolver // Required for Magento 2.4.0+ 'xsl', 'sodium', + 'ftp' ]; /** @@ -62,7 +63,7 @@ class ExtensionResolver 'dom' => '>=7.0', 'fileinfo' => '>=7.0', 'filter' => '>=7.0', - 'ftp' => '>=7.0', + 'ftp' => '>=7.0 <8.2', 'hash' => '>=7.0', 'iconv' => '>=7.0', 'json' => '>=7.0', @@ -158,7 +159,7 @@ public function get(Config $config): array /** * @return array * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings("PHPMD.ExcessiveMethodLength") */ public static function getConfig(): array { @@ -340,7 +341,7 @@ public static function getConfig(): array '>=7.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE], ], 'zookeeper' => [ - '>=7.2' => [ + '>=8.0 <8.2' => [ self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, // phpcs:disable self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH @@ -423,10 +424,22 @@ public static function getConfig(): array ], ], 'xdebug' => [ - '>=7.2' => [ + '>=8.0 <8.2' => [ self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL, self::EXTENSION_PACKAGE_NAME => 'xdebug-3.1.2', ], + '>=8.2 <8.3' => [ + self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL, + self::EXTENSION_PACKAGE_NAME => 'xdebug-3.2.0', + ], + '>=8.3' => [ + self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL, + self::EXTENSION_PACKAGE_NAME => 'xdebug-3.3.0', + ], + '>=8.4' => [ + self::EXTENSION_TYPE => self::EXTENSION_TYPE_PECL, + self::EXTENSION_PACKAGE_NAME => 'xdebug-3.4.0', + ], ], 'xmlrpc' => [ '>=7.0 <8.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE], @@ -467,7 +480,7 @@ public static function getConfig(): array '>=7.0' => [self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE], ], 'ioncube' => [ - '>=7.0 <=7.4' => [ + '>=7.0 <8.0 || >8.0 <=8.1' => [ self::EXTENSION_TYPE => self::EXTENSION_TYPE_INSTALLATION_SCRIPT, self::EXTENSION_INSTALLATION_SCRIPT => <<< BASH cd /tmp @@ -482,6 +495,11 @@ public static function getConfig(): array BASH ], ], + 'ftp' => [ + '>=8.2' => [ + self::EXTENSION_TYPE => self::EXTENSION_TYPE_CORE, + ], + ], ]; } } diff --git a/src/Compose/ProductionBuilder.php b/src/Compose/ProductionBuilder.php index 7e73daf7..007cdb4e 100644 --- a/src/Compose/ProductionBuilder.php +++ b/src/Compose/ProductionBuilder.php @@ -83,9 +83,9 @@ public function __construct( /** * {@inheritdoc} * - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings("PHPMD.ExcessiveMethodLength") + * @SuppressWarnings("PHPMD.CyclomaticComplexity") + * @SuppressWarnings("PHPMD.NPathComplexity") */ public function build(Config $config): Manager { diff --git a/src/Compose/ProductionBuilder/CliDepend.php b/src/Compose/ProductionBuilder/CliDepend.php index 46abe017..c79b0a26 100644 --- a/src/Compose/ProductionBuilder/CliDepend.php +++ b/src/Compose/ProductionBuilder/CliDepend.php @@ -27,6 +27,9 @@ class CliDepend BuilderInterface::SERVICE_REDIS => [ 'condition' => 'service_healthy' ], + BuilderInterface::SERVICE_VALKEY => [ + 'condition' => 'service_healthy' + ], BuilderInterface::SERVICE_ELASTICSEARCH => [ 'condition' => 'service_healthy' ], diff --git a/src/Compose/ProductionBuilder/Service/Database/Db/HealthCheck.php b/src/Compose/ProductionBuilder/Service/Database/Db/HealthCheck.php index f3ae6cdf..3c9eb951 100644 --- a/src/Compose/ProductionBuilder/Service/Database/Db/HealthCheck.php +++ b/src/Compose/ProductionBuilder/Service/Database/Db/HealthCheck.php @@ -20,7 +20,10 @@ class HealthCheck public function getConfig(): array { return [ - 'test' => 'mysqladmin ping -h localhost -pmagento2', + 'test' => [ + 'CMD-SHELL', + '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' + ], 'interval' => '30s', 'timeout' => '30s', 'retries' => 3 diff --git a/src/Compose/ProductionBuilder/Service/ElasticSearch.php b/src/Compose/ProductionBuilder/Service/ElasticSearch.php index bd450b54..6c1af0d5 100644 --- a/src/Compose/ProductionBuilder/Service/ElasticSearch.php +++ b/src/Compose/ProductionBuilder/Service/ElasticSearch.php @@ -73,7 +73,7 @@ public function getConfig(Config $config): array return $this->serviceFactory->create( $this->getServiceName(), $config->getServiceVersion($this->getServiceName()), - !empty($esEnvVars) ? ['environment' => $esEnvVars] : [], + ['environment' => $esEnvVars], $config->getServiceImage($this->getServiceName()), $config->getCustomRegistry(), $config->getServiceImagePattern($this->getServiceName()) diff --git a/src/Compose/ProductionBuilder/Service/OpenSearch.php b/src/Compose/ProductionBuilder/Service/OpenSearch.php index 79056fc0..460d532f 100644 --- a/src/Compose/ProductionBuilder/Service/OpenSearch.php +++ b/src/Compose/ProductionBuilder/Service/OpenSearch.php @@ -18,8 +18,16 @@ */ class OpenSearch implements ServiceBuilderInterface { + /** + * The list of installed plugins by default + */ private const INSTALLED_PLUGINS = ['analysis-icu', 'analysis-phonetic']; + /** + * The default OpenSearch version, which will be used if config has only major version + */ + private const DEFAULT_VERSION = '2.4'; + /** * @var ServiceFactory */ @@ -75,8 +83,8 @@ public function getConfig(Config $config): array return $this->serviceFactory->create( $this->getServiceName(), - $config->getServiceVersion($this->getServiceName()), - !empty($osEnvVars) ? ['environment' => $osEnvVars] : [], + $this->getVersion($config), + ['environment' => $osEnvVars], $config->getServiceImage($this->getServiceName()), $config->getCustomRegistry(), $config->getServiceImagePattern($this->getServiceName()) @@ -98,4 +106,18 @@ public function getDependsOn(Config $config): array { return []; } + + /** + * If config has only major version 2 - returns default OpenSearch version for MCD + * @see OpenSearch::DEFAULT_VERSION + * + * @param Config $config + * @return string + * @throws \Magento\CloudDocker\App\ConfigurationMismatchException + */ + private function getVersion(Config $config): string + { + $version = $config->getServiceVersion($this->getServiceName()); + return $version == '2' ? self::DEFAULT_VERSION : $version; + } } diff --git a/src/Compose/ProductionBuilder/Service/Valkey.php b/src/Compose/ProductionBuilder/Service/Valkey.php new file mode 100644 index 00000000..150a54d8 --- /dev/null +++ b/src/Compose/ProductionBuilder/Service/Valkey.php @@ -0,0 +1,93 @@ +serviceFactory = $serviceFactory; + } + + /** + * @inheritDoc + */ + public function getName(): string + { + return BuilderInterface::SERVICE_VALKEY; + } + + /** + * @inheritDoc + */ + public function getServiceName(): string + { + return $this->getName(); + } + + /** + * @inheritDoc + */ + public function getConfig(Config $config): array + { + $configArray = $this->serviceFactory->create( + $this->getServiceName(), + $config->getServiceVersion($this->getServiceName()), + [ + BuilderInterface::SERVICE_HEALTHCHECK => [ + 'test' => 'valkey-cli ping || exit 1', + 'interval' => '30s', + 'timeout' => '30s', + 'retries' => 3 + ] + ], + $config->getServiceImage($this->getServiceName()), + $config->getCustomRegistry() + ); + + // Set both 'cache' and 'valkey.magento2.docker' as aliases unconditionally + $configArray['networks'][BuilderInterface::NETWORK_MAGENTO]['aliases'] = [ + 'cache', + 'valkey.magento2.docker' + ]; + + return $configArray; + } + + /** + * @inheritDoc + */ + public function getNetworks(): array + { + return [BuilderInterface::NETWORK_MAGENTO]; + } + + /** + * @inheritDoc + */ + public function getDependsOn(Config $config): array + { + return []; + } +} diff --git a/src/Config/Relationship.php b/src/Config/Relationship.php index c98edcf9..c22e4c3e 100644 --- a/src/Config/Relationship.php +++ b/src/Config/Relationship.php @@ -55,6 +55,12 @@ class Relationship 'port' => '6379' ] ], + 'valkey' => [ + [ + 'host' => 'cache', + 'port' => '6379' + ] + ], 'elasticsearch' => [ [ 'host' => 'elasticsearch', diff --git a/src/Config/Source/CliSource.php b/src/Config/Source/CliSource.php index e57db64c..1d2d8e6b 100644 --- a/src/Config/Source/CliSource.php +++ b/src/Config/Source/CliSource.php @@ -27,6 +27,7 @@ class CliSource implements SourceInterface public const OPTION_EXPOSE_DB_QUOTE_PORT = 'expose-db-quote-port'; public const OPTION_EXPOSE_DB_SALES_PORT = 'expose-db-sales-port'; public const OPTION_REDIS = 'redis'; + public const OPTION_VALKEY = 'valkey'; public const OPTION_ES = 'es'; public const OPTION_OS = 'os'; public const OPTION_RABBIT_MQ = 'rmq'; @@ -37,6 +38,8 @@ class CliSource implements SourceInterface public const OPTION_INSTALLATION_TYPE = 'installation-type'; public const OPTION_NO_ES = 'no-es'; public const OPTION_NO_OS = 'no-os'; + public const OPTION_NO_REDIS = 'no-redis'; + public const OPTION_NO_DB = 'no-db'; public const OPTION_NO_MAILHOG = 'no-mailhog'; public const OPTION_NO_TLS = 'no-tls'; @@ -124,6 +127,9 @@ class CliSource implements SourceInterface self::OPTION_REDIS => [ self::SERVICES_REDIS => true ], + self::OPTION_VALKEY => [ + self::SERVICES_VALKEY => true + ], self::OPTION_ES => [ self::SERVICES_ES => true ], @@ -146,6 +152,8 @@ class CliSource implements SourceInterface private static $disableOptionsMap = [ self::OPTION_NO_ES => self::SERVICES_ES, self::OPTION_NO_OS => self::SERVICES_OS, + self::OPTION_NO_REDIS => self::SERVICES_REDIS, + self::OPTION_NO_DB => self::SERVICES_DB, self::OPTION_NO_MAILHOG => self::SERVICES_MAILHOG, self::OPTION_NO_TLS => self::SERVICES_TLS, ]; @@ -166,9 +174,9 @@ public function __construct(InputInterface $input) /** * {@inheritDoc} * - * @SuppressWarnings(PHPMD.NPathComplexity) - * @SuppressWarnings(PHPMD.CyclomaticComplexity) - * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * @SuppressWarnings("PHPMD.NPathComplexity") + * @SuppressWarnings("PHPMD.CyclomaticComplexity") + * @SuppressWarnings("PHPMD.ExcessiveMethodLength") */ public function read(): Repository { diff --git a/src/Config/Source/CloudSource.php b/src/Config/Source/CloudSource.php index 2d2ddc8d..2e9e3712 100644 --- a/src/Config/Source/CloudSource.php +++ b/src/Config/Source/CloudSource.php @@ -47,6 +47,7 @@ class CloudSource implements SourceInterface ServiceInterface::SERVICE_ELASTICSEARCH => ['elasticsearch', 'es'], ServiceInterface::SERVICE_OPENSEARCH => ['opensearch', 'os'], ServiceInterface::SERVICE_REDIS => ['redis'], + ServiceInterface::SERVICE_VALKEY => ['cache','valkey'], ServiceInterface::SERVICE_RABBITMQ => ['rmq', 'rabbitmq'] ]; diff --git a/src/Config/Source/SourceInterface.php b/src/Config/Source/SourceInterface.php index 9456293d..292a35ce 100644 --- a/src/Config/Source/SourceInterface.php +++ b/src/Config/Source/SourceInterface.php @@ -73,6 +73,11 @@ interface SourceInterface */ public const SERVICES_REDIS = self::SERVICES . '.' . ServiceInterface::SERVICE_REDIS; + /** + * Valkey + */ + public const SERVICES_VALKEY = self::SERVICES . '.' . ServiceInterface::SERVICE_VALKEY; + /** * ES */ diff --git a/src/Service/ServiceFactory.php b/src/Service/ServiceFactory.php index b04286fb..119fcc51 100644 --- a/src/Service/ServiceFactory.php +++ b/src/Service/ServiceFactory.php @@ -42,7 +42,7 @@ class ServiceFactory */ private const SERVICE_NGINX_CONFIG = [ 'image' => 'magento/magento-cloud-docker-nginx', - 'version' => '1.19', + 'version' => '1.24', 'pattern' => self::PATTERN_VERSIONED, 'config' => [ 'extends' => ServiceInterface::SERVICE_GENERIC, @@ -105,6 +105,26 @@ class ServiceFactory ] ], ], + ServiceInterface::SERVICE_VALKEY => [ + 'image' => 'valkey/valkey', + 'pattern' => self::PATTERN_STD, + 'config' => [ + 'volumes' => [ + '/data', + ], + 'ports' => [6379], + 'sysctls' => [ + 'net.core.somaxconn' => 1024, + ], + 'ulimits' => [ + 'nproc' => 65535, + 'nofile' => [ + 'soft' => 20000, + 'hard' => 40000 + ], + ] + ], + ], ServiceInterface::SERVICE_ELASTICSEARCH => [ 'image' => 'magento/magento-cloud-docker-elasticsearch', 'pattern' => self::PATTERN_VERSIONED, @@ -191,7 +211,7 @@ public function __construct(FileList $fileList) * @param string $name * @param string $version * @param array $config - * @param string $image + * @param string|null $image * @param string|null $customRegistry * @param string|null $imagePattern * @return array @@ -201,9 +221,9 @@ public function create( string $name, string $version, array $config = [], - string $image = null, - string $customRegistry = null, - string $imagePattern = null + ?string $image = null, + ?string $customRegistry = null, + ?string $imagePattern = null ): array { if (!array_key_exists($name, self::$config)) { throw new ConfigurationMismatchException(sprintf( diff --git a/src/Service/ServiceInterface.php b/src/Service/ServiceInterface.php index 4ee3be2b..54936094 100644 --- a/src/Service/ServiceInterface.php +++ b/src/Service/ServiceInterface.php @@ -23,6 +23,7 @@ interface ServiceInterface public const SERVICE_DB_SALES = 'mysql-sales'; public const SERVICE_NGINX = 'nginx'; public const SERVICE_REDIS = 'redis'; + public const SERVICE_VALKEY = 'valkey'; public const SERVICE_ELASTICSEARCH = 'elasticsearch'; public const SERVICE_OPENSEARCH = 'opensearch'; public const SERVICE_RABBITMQ = 'rabbitmq'; diff --git a/src/Test/Functional/Acceptance/AbstractCest.php b/src/Test/Functional/Acceptance/AbstractCest.php index e9432f19..1a446852 100644 --- a/src/Test/Functional/Acceptance/AbstractCest.php +++ b/src/Test/Functional/Acceptance/AbstractCest.php @@ -33,14 +33,14 @@ public function _before(\CliTester $I): void $I->cloneTemplateToWorkDir(static::TEMPLATE_VERSION); $I->createAuthJson(); $I->createArtifactsDir(); - $I->createArtifactCurrentTestedCode('docker', '1.3.1'); + $I->createArtifactCurrentTestedCode('docker', '1.4.3'); $I->addArtifactsRepoToComposer(); - $I->addDependencyToComposer('magento/magento-cloud-docker', '1.3.1'); + $I->addDependencyToComposer('magento/magento-cloud-docker', '1.4.3'); $I->addEceToolsGitRepoToComposer(); $I->addDependencyToComposer( 'magento/ece-tools', - $I->getDependencyVersion('magento/ece-tools') ?: 'dev-develop as 2002.1.99' + $I->getDependencyVersion('magento/ece-tools') ?: 'dev-develop as 2002.2.99' ); if ($mccVersion = $I->getDependencyVersion('magento/magento-cloud-components')) { diff --git a/src/Test/Functional/Acceptance/Acceptance81Cest.php b/src/Test/Functional/Acceptance/Acceptance81Cest.php new file mode 100644 index 00000000..c748f419 --- /dev/null +++ b/src/Test/Functional/Acceptance/Acceptance81Cest.php @@ -0,0 +1,21 @@ + '6.5', - 'xms' => '516m', - 'xmx' => '516m', - 'param' => [ - 'key' => 'index.store.type', - 'value' => 'fs', - 'needle' => '"index":{"store":{"type":"fs"}}', - ] - ], - ]; - } -} diff --git a/src/Test/Functional/Acceptance/Elasticsearch73Cest.php b/src/Test/Functional/Acceptance/Elasticsearch81Cest.php similarity index 60% rename from src/Test/Functional/Acceptance/Elasticsearch73Cest.php rename to src/Test/Functional/Acceptance/Elasticsearch81Cest.php index c74097fd..a5553ae2 100644 --- a/src/Test/Functional/Acceptance/Elasticsearch73Cest.php +++ b/src/Test/Functional/Acceptance/Elasticsearch81Cest.php @@ -12,14 +12,14 @@ use Robo\Exception\TaskException; /** - * @group php73 + * @group php81 */ -class Elasticsearch73Cest extends ElasticsearchCest +class Elasticsearch81Cest extends ElasticsearchCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.3.5'; + protected const TEMPLATE_VERSION = '2.4.4'; /** * @return array @@ -28,19 +28,10 @@ protected function dataProvider(): array { return [ [ - 'version' => '6.5', - 'xms' => '518m', - 'xmx' => '518m', - 'param' => [ - 'key' => 'node.store.allow_mmapfs', - 'value' => 'false', - 'needle' => '"store":{"allow_mmapfs":"false"}', - ] - ], - [ - 'version' => '7.5', + 'version' => '7.6', 'xms' => '520m', 'xmx' => '520m', + 'plugins' => ['analysis-nori'], 'param' => [ 'key' => 'node.store.allow_mmap', 'value' => 'false', diff --git a/src/Test/Functional/Acceptance/Elasticsearch82Cest.php b/src/Test/Functional/Acceptance/Elasticsearch82Cest.php new file mode 100644 index 00000000..681dc973 --- /dev/null +++ b/src/Test/Functional/Acceptance/Elasticsearch82Cest.php @@ -0,0 +1,23 @@ + '7.6', + 'version' => '7.10', 'xms' => '520m', 'xmx' => '520m', 'plugins' => ['analysis-nori'], diff --git a/src/Test/Functional/Acceptance/Acceptance72Cest.php b/src/Test/Functional/Acceptance/MailHog82Cest.php similarity index 69% rename from src/Test/Functional/Acceptance/Acceptance72Cest.php rename to src/Test/Functional/Acceptance/MailHog82Cest.php index b435d2d9..52e0f255 100644 --- a/src/Test/Functional/Acceptance/Acceptance72Cest.php +++ b/src/Test/Functional/Acceptance/MailHog82Cest.php @@ -8,12 +8,12 @@ namespace Magento\CloudDocker\Test\Functional\Acceptance; /** - * @group php72 + * @group php82 */ -class Acceptance72Cest extends AcceptanceCest +class MailHog82Cest extends MailHogCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.3.2'; + protected const TEMPLATE_VERSION = '2.4.6'; } diff --git a/src/Test/Functional/Acceptance/Acceptance73Cest.php b/src/Test/Functional/Acceptance/MailHog83Cest.php similarity index 69% rename from src/Test/Functional/Acceptance/Acceptance73Cest.php rename to src/Test/Functional/Acceptance/MailHog83Cest.php index 1c689cd0..d7c263da 100644 --- a/src/Test/Functional/Acceptance/Acceptance73Cest.php +++ b/src/Test/Functional/Acceptance/MailHog83Cest.php @@ -8,12 +8,12 @@ namespace Magento\CloudDocker\Test\Functional\Acceptance; /** - * @group php73 + * @group php83 */ -class Acceptance73Cest extends AcceptanceCest +class MailHog83Cest extends MailHogCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.3.5'; + protected const TEMPLATE_VERSION = '2.4.7'; } diff --git a/src/Test/Functional/Acceptance/MailHogCest.php b/src/Test/Functional/Acceptance/MailHogCest.php index 96e74941..53938778 100644 --- a/src/Test/Functional/Acceptance/MailHogCest.php +++ b/src/Test/Functional/Acceptance/MailHogCest.php @@ -8,14 +8,14 @@ namespace Magento\CloudDocker\Test\Functional\Acceptance; /** - * @group php81 + * @group php84 */ class MailHogCest extends AbstractCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.4.4'; + protected const TEMPLATE_VERSION = '2.4.8'; /** * @param \CliTester $I diff --git a/src/Test/Functional/Acceptance/Elasticsearch74Cest.php b/src/Test/Functional/Acceptance/Opensearch81Cest.php similarity index 68% rename from src/Test/Functional/Acceptance/Elasticsearch74Cest.php rename to src/Test/Functional/Acceptance/Opensearch81Cest.php index 18f4d7d0..cd49356a 100644 --- a/src/Test/Functional/Acceptance/Elasticsearch74Cest.php +++ b/src/Test/Functional/Acceptance/Opensearch81Cest.php @@ -12,14 +12,14 @@ use Robo\Exception\TaskException; /** - * @group php74 + * @group php81 */ -class Elasticsearch74Cest extends ElasticsearchCest +class Opensearch81Cest extends OpensearchCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.4.0'; + protected const TEMPLATE_VERSION = '2.4.4'; /** * @return array @@ -28,17 +28,18 @@ protected function dataProvider(): array { return [ [ - 'version' => '6.5', - 'xms' => '518m', - 'xmx' => '518m', + 'version' => '1.1', + 'xms' => '520m', + 'xmx' => '520m', + 'plugins' => ['analysis-nori'], 'param' => [ - 'key' => 'node.store.allow_mmapfs', + 'key' => 'node.store.allow_mmap', 'value' => 'false', - 'needle' => '"store":{"allow_mmapfs":"false"}', + 'needle' => '"store":{"allow_mmap":"false"}', ] ], [ - 'version' => '7.5', + 'version' => '1.2', 'xms' => '520m', 'xmx' => '520m', 'plugins' => ['analysis-nori'], diff --git a/src/Test/Functional/Acceptance/Opensearch82Cest.php b/src/Test/Functional/Acceptance/Opensearch82Cest.php new file mode 100644 index 00000000..8bfcd7de --- /dev/null +++ b/src/Test/Functional/Acceptance/Opensearch82Cest.php @@ -0,0 +1,23 @@ + '1.2', + 'version' => '2.3', + 'xms' => '520m', + 'xmx' => '520m', + 'plugins' => ['analysis-nori'], + 'param' => [ + 'key' => 'node.store.allow_mmap', + 'value' => 'false', + 'needle' => '"store":{"allow_mmap":"false"}', + ] + ], + [ + 'version' => '2.4', 'xms' => '520m', 'xmx' => '520m', 'plugins' => ['analysis-nori'], diff --git a/src/Test/Functional/Acceptance/Services72Cest.php b/src/Test/Functional/Acceptance/Services72Cest.php deleted file mode 100644 index b627e4bd..00000000 --- a/src/Test/Functional/Acceptance/Services72Cest.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'options' => '', - 'expectedResult' => [ - 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.2-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2' - ], - 'notExpectedResult' => ['rabbitmq', 'selenium/standalone-chrome:latest', 'cron'], - ], - 'Redis 3.2, MariaDB 10.1, php 7.4, rmq 3.5' => [ - 'options' => '--redis=3.2 --db=10.1 --php=7.4 --rmq=3.5', - 'expectedResult' => [ - 'redis:3.2', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.4-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.1', - 'rabbitmq:3.5' - ], - 'notExpectedResult' => ['selenium', 'cron'], - ], - 'Redis 4.0, MariaDB 10.2, php 7.2, rmq 3.6' => [ - 'options' => '--redis=4.0 --db=10.2 --php=7.2 --rmq=3.6', - 'expectedResult' => [ - 'redis:4.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.2-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2', - 'rabbitmq:3.6' - ], - 'notExpectedResult' => ['selenium', 'cron'], - ], - 'With cron and selenium' => [ - 'options' => '--with-cron --with-selenium', - 'expectedResult' => [ - 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.2-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2', - 'cron', - 'selenium/standalone-chrome:latest' - ], - 'notExpectedResult' => ['rabbitmq'], - ], - ]; - } -} diff --git a/src/Test/Functional/Acceptance/ServicesCest.php b/src/Test/Functional/Acceptance/ServicesCest.php deleted file mode 100644 index 52916362..00000000 --- a/src/Test/Functional/Acceptance/ServicesCest.php +++ /dev/null @@ -1,144 +0,0 @@ -assertTrue($I->generateDockerCompose('--mode=production ' . $data['options'])); - $I->assertTrue($I->replaceImagesWithCurrentDockerVersion()); - $I->assertTrue($I->startEnvironment()); - $I->assertTrue($I->runBashCommand('docker ps')); - $I->seeInOutput($data['expectedResult']); - $I->stopEnvironment(); - if (isset($data['notExpectedResult'])) { - $I->doNotSeeInOutput($data['notExpectedResult']); - } - } catch (\Exception $exception) { - parent::_after($I); - self::$beforeShouldRun = true; - throw $exception; - } - - if (self::$counter === $this->getVariantsCount()) { - parent::_after($I); - } - } - - /** - * @return int - */ - protected function getVariantsCount(): int - { - return sizeof($this->servicesDataProvider()); - } - - /** - * @return array - */ - protected function servicesDataProvider(): array - { - return [ - 'Default' => [ - 'options' => '', - 'expectedResult' => [ - 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.3-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2' - ], - 'notExpectedResult' => ['rabbitmq', 'selenium/standalone-chrome:latest', 'cron'], - ], - 'Redis 3.2, MariaDB 10.1, php 7.2, rmq 3.5' => [ - 'options' => '--redis=3.2 --db=10.1 --php=7.2 --rmq=3.5', - 'expectedResult' => [ - 'redis:3.2', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.2-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.1', - 'rabbitmq:3.5' - ], - 'notExpectedResult' => ['selenium', 'cron'], - ], - 'Redis 4.0, MariaDB 10.2, php 7.4, rmq 3.6' => [ - 'options' => '--redis=4.0 --db=10.2 --php=7.4 --rmq=3.6', - 'expectedResult' => [ - 'redis:4.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.4-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2', - 'rabbitmq:3.6' - ], - 'notExpectedResult' => ['selenium', 'cron'], - ], - 'With cron and selenium' => [ - 'options' => '--with-cron --with-selenium', - 'expectedResult' => [ - 'redis:5.0', - 'magento/magento-cloud-docker-varnish:6.6-1.3', - 'magento/magento-cloud-docker-nginx:1.19-1.3', - 'magento/magento-cloud-docker-php:7.3-fpm-1.3', - 'magento/magento-cloud-docker-elasticsearch:6.5-1.3', - 'mariadb:10.2', - 'cron', - 'selenium/standalone-chrome:latest' - ], - 'notExpectedResult' => ['rabbitmq'], - ], - ]; - } -} diff --git a/src/Test/Functional/Acceptance/Acceptance74Cest.php b/src/Test/Functional/Acceptance/Valkey83Cest.php similarity index 69% rename from src/Test/Functional/Acceptance/Acceptance74Cest.php rename to src/Test/Functional/Acceptance/Valkey83Cest.php index 65a277aa..b1231965 100644 --- a/src/Test/Functional/Acceptance/Acceptance74Cest.php +++ b/src/Test/Functional/Acceptance/Valkey83Cest.php @@ -8,12 +8,12 @@ namespace Magento\CloudDocker\Test\Functional\Acceptance; /** - * @group php74 + * @group php83 */ -class Acceptance74Cest extends AcceptanceCest +class Valkey83Cest extends ValkeyCest { /** * Template version for testing */ - protected const TEMPLATE_VERSION = '2.4.3'; + protected const TEMPLATE_VERSION = '2.4.7'; } diff --git a/src/Test/Functional/Acceptance/ValkeyCest.php b/src/Test/Functional/Acceptance/ValkeyCest.php new file mode 100644 index 00000000..bf9280e5 --- /dev/null +++ b/src/Test/Functional/Acceptance/ValkeyCest.php @@ -0,0 +1,119 @@ +generateDockerCompose($this->buildCommand($data)); + $I->replaceImagesWithCustom(); + $I->startEnvironment(); + + // Test Valkey connectivity (this also confirms it's running) + $I->runDockerComposeCommand('exec -T valkey valkey-cli ping'); + $I->seeInOutput('PONG'); + + // Test that Valkey container is running and healthy + $I->runDockerComposeCommand('ps'); + $I->seeInOutput('valkey'); + $I->seeInOutput('(healthy)'); + + // Test that Valkey is accessible through cache alias (using nc to test network connectivity) + $I->runDockerComposeCommand('exec -T fpm nc -z cache 6379'); + $I->seeInOutput(''); // nc returns empty output on success + + // Test that Valkey is accessible through valkey.magento2.docker alias + $I->runDockerComposeCommand('exec -T fpm nc -z valkey.magento2.docker 6379'); + $I->seeInOutput(''); + + // Test basic Valkey functionality + $I->runDockerComposeCommand('exec -T valkey valkey-cli set test_key "test_value"'); + $I->seeInOutput('OK'); + + $I->runDockerComposeCommand('exec -T valkey valkey-cli get test_key'); + $I->seeInOutput('test_value'); + + // Test Valkey info command to verify version + $I->runDockerComposeCommand('exec -T valkey valkey-cli info server'); + $I->seeInOutput('valkey_version:' . $data['version']); + + // Test confirmed: Valkey is accessible on port 6379 (validated via info command above) + + // Test memory usage reporting + $I->runDockerComposeCommand('exec -T valkey valkey-cli info memory'); + $I->seeInOutput('used_memory:'); + $I->seeInOutput('used_memory_human:'); + + // Test health check functionality + $I->runDockerComposeCommand('exec -T valkey valkey-cli ping'); + $I->seeInOutput('PONG'); + + // Test data persistence + $I->runDockerComposeCommand('exec -T valkey valkey-cli set persistent_key "persistent_value"'); + $I->seeInOutput('OK'); + + $I->runDockerComposeCommand('exec -T valkey valkey-cli get persistent_key'); + $I->seeInOutput('persistent_value'); + + // Test database operations + $I->runDockerComposeCommand('exec -T valkey valkey-cli dbsize'); + $I->seeInOutput('2'); // We should have 2 keys: test_key and persistent_key + + // Test that Valkey configuration is accessible + $I->runDockerComposeCommand('exec -T valkey valkey-cli config get save'); + $I->seeInOutput('save'); + } + + /** + * Builds build:compose command from given test data + * + * @param Example $data + * @return string + */ + private function buildCommand(Example $data): string + { + $command = sprintf( + '--mode=production --valkey=%s --no-es --no-os --no-redis', + $data['version'] + ); + + return $command; + } + + /** + * @return array + */ + protected function dataProvider(): array + { + return [ + [ + 'version' => '8.0', + ], + ]; + } +} diff --git a/src/Test/Integration/BuildComposeTest.php b/src/Test/Integration/BuildComposeTest.php index 707c262f..e2501ac9 100644 --- a/src/Test/Integration/BuildComposeTest.php +++ b/src/Test/Integration/BuildComposeTest.php @@ -51,12 +51,12 @@ public function testBuild(string $directory, array $options): void ); /** @var MockObject|InputInterface $inputMock */ - $inputMock = $this->getMockForAbstractClass(InputInterface::class); + $inputMock = $this->createMock(InputInterface::class); $inputMock->method('getOption') ->willReturnMap($options); /** @var MockObject|OutputInterface $outputMock */ - $outputMock = $this->getMockForAbstractClass(OutputInterface::class); + $outputMock = $this->createMock(OutputInterface::class); $command->execute($inputMock, $outputMock); @@ -71,7 +71,7 @@ public function testBuild(string $directory, array $options): void * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function buildDataProvider(): array + public static function buildDataProvider(): array { return [ 'cloud-base' => [ @@ -82,6 +82,24 @@ public function buildDataProvider(): array [CliSource::OPTION_WITH_MARIADB_CONF, true] ] ], + 'cloud-base-os-2-cli' => [ + __DIR__ . '/_files/cloud_base_os_2_cli', + [ + [CliSource::OPTION_MODE, BuilderFactory::BUILDER_PRODUCTION], + [CliSource::OPTION_WITH_ENTRYPOINT, true], + [CliSource::OPTION_WITH_MARIADB_CONF, true], + [CliSource::OPTION_OS, '2'], + ] + ], + 'cloud-base-os-2.3-cli' => [ + __DIR__ . '/_files/cloud_base_os_2.3_cli', + [ + [CliSource::OPTION_MODE, BuilderFactory::BUILDER_PRODUCTION], + [CliSource::OPTION_WITH_ENTRYPOINT, true], + [CliSource::OPTION_WITH_MARIADB_CONF, true], + [CliSource::OPTION_OS, '2.3'], + ] + ], 'custom_registry' => [ __DIR__ . '/_files/custom_registry', [ diff --git a/src/Test/Integration/BuildCustomComposeTest.php b/src/Test/Integration/BuildCustomComposeTest.php index 32a5d2b4..ff1f723b 100644 --- a/src/Test/Integration/BuildCustomComposeTest.php +++ b/src/Test/Integration/BuildCustomComposeTest.php @@ -69,7 +69,7 @@ public function testBuild(string $directory, array $arguments): void * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function buildDataProvider(): array + public static function buildDataProvider(): array { return [ 'cloud-base' => [ @@ -94,7 +94,7 @@ public function buildDataProvider(): array ], 'services' => [ 'php' => [ - 'version' => '7.2', + 'version' => '8.0', 'enabled' => true, 'extensions' => [ 'enabled' => ['xsl'] @@ -149,7 +149,7 @@ public function buildDataProvider(): array ], 'services' => [ 'php' => [ - 'version' => '7.2', + 'version' => '8.0', 'enabled' => true, 'extensions' => [ 'enabled' => ['xsl'] @@ -248,7 +248,7 @@ public function buildDataProvider(): array ], 'nginx' => [ 'image' => 'nginx-v1', - 'version' => '1.19', + 'version' => '1.24', 'image-pattern' => '%s:%s', 'enabled' => 'true', ], @@ -290,7 +290,7 @@ public function buildDataProvider(): array 'services' => [ 'php' => [ 'enabled' => true, - 'version' => '7.2', + 'version' => '8.0', ], 'mysql' => [ 'enabled' => true, @@ -313,7 +313,7 @@ public function buildDataProvider(): array 'services' => [ 'php' => [ 'enabled' => true, - 'version' => '7.2', + 'version' => '8.0', ], 'mysql' => [ 'enabled' => true, @@ -336,7 +336,7 @@ public function buildDataProvider(): array 'services' => [ 'php' => [ 'enabled' => true, - 'version' => '7.2', + 'version' => '8.0', ], 'mysql' => [ 'enabled' => true, diff --git a/src/Test/Integration/_files/cloud_base/.magento.app.yaml b/src/Test/Integration/_files/cloud_base/.magento.app.yaml index 03f4f7b2..2c4f919c 100644 --- a/src/Test/Integration/_files/cloud_base/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml index e054a41c..1ed81d52 100644 --- a/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base/docker-compose.exp.yml @@ -17,7 +17,9 @@ services: - 'magento-magento-db:/var/lib/mysql' - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -83,7 +85,7 @@ services: - opensearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -103,7 +105,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -137,7 +139,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -156,14 +158,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -185,7 +187,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_base_developer/.docker/config.php.dist b/src/Test/Integration/_files/cloud_base_developer/.docker/config.php.dist index 73c31674..f0e88e79 100644 --- a/src/Test/Integration/_files/cloud_base_developer/.docker/config.php.dist +++ b/src/Test/Integration/_files/cloud_base_developer/.docker/config.php.dist @@ -30,7 +30,7 @@ return [ [ 'host' => 'opensearch', 'port' => '9200', - 'type' => 'opensearch:1.1' + 'type' => 'opensearch:2' ] ] ])), diff --git a/src/Test/Integration/_files/cloud_base_developer/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_developer/.magento.app.yaml index 03f4f7b2..2c4f919c 100644 --- a/src/Test/Integration/_files/cloud_base_developer/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_developer/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_developer/.magento/services.yaml b/src/Test/Integration/_files/cloud_base_developer/.magento/services.yaml index cad17cb8..f2b85f32 100644 --- a/src/Test/Integration/_files/cloud_base_developer/.magento/services.yaml +++ b/src/Test/Integration/_files/cloud_base_developer/.magento/services.yaml @@ -14,7 +14,7 @@ elasticsearch: - plugin_2 opensearch: - type: opensearchsearch:1.1 + type: opensearchsearch:2 disk: 512 configuration: plugins: diff --git a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml index 4282169c..e96c64b1 100644 --- a/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer/docker-compose.exp.yml @@ -17,7 +17,9 @@ services: - '.docker/mysql/mariadb.conf.d:/etc/mysql/mariadb.conf.d' - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -65,7 +67,7 @@ services: - elasticsearch.magento2.docker opensearch: hostname: opensearch.magento2.docker - image: 'magento/magento-cloud-docker-opensearch:1.1-1.2.0' + image: 'magento/magento-cloud-docker-opensearch:2.4-1.2.0' ulimits: memlock: soft: -1 @@ -83,7 +85,7 @@ services: - opensearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:delegated' @@ -96,7 +98,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:delegated' @@ -123,7 +125,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -142,7 +144,7 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - MAGENTO_RUN_MODE=developer @@ -150,7 +152,7 @@ services: - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:delegated' @@ -169,7 +171,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:delegated' diff --git a/src/Test/Integration/_files/cloud_base_developer_manual/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_developer_manual/.magento.app.yaml index 0fae6f4b..0dac5bfe 100644 --- a/src/Test/Integration/_files/cloud_base_developer_manual/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_developer_manual/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml index d8c7d928..b244c9eb 100644 --- a/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_developer_manual/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - 'magento-app:/app' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -63,7 +65,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - 'magento-app:/app' @@ -76,7 +78,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - 'magento-app:/app' @@ -103,7 +105,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -122,7 +124,7 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - MAGENTO_RUN_MODE=developer @@ -130,7 +132,7 @@ services: - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - 'magento-app:/app' @@ -147,7 +149,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - 'magento-app:/app' diff --git a/src/Test/Integration/_files/cloud_base_mftf/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_mftf/.magento.app.yaml index 03f4f7b2..2c4f919c 100644 --- a/src/Test/Integration/_files/cloud_base_mftf/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_mftf/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml index 6e8bab5e..b9b179e0 100644 --- a/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_mftf/docker-compose.exp.yml @@ -17,7 +17,9 @@ services: - 'magento-magento-db:/var/lib/mysql' - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -51,7 +53,7 @@ services: - redis.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - './magento2ce:/app:ro,delegated' @@ -72,7 +74,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - './magento2ce:/app:ro,delegated' @@ -107,7 +109,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -140,7 +142,7 @@ services: condition: service_started test: hostname: test.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - './magento2ce:/app:rw,delegated' @@ -164,7 +166,7 @@ services: condition: service_healthy fpm_xdebug: hostname: fpm_xdebug.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - './magento2ce:/app:ro,delegated' @@ -187,13 +189,13 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - './magento2ce:/app:rw,delegated' @@ -211,7 +213,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - './magento2ce:/app:ro,delegated' @@ -234,7 +236,7 @@ services: condition: service_healthy cron: hostname: cron.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic command: run-cron environment: diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/.docker/.gitignore b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.docker/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/.docker/config.php.dist b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.docker/config.php.dist new file mode 100644 index 00000000..a6fc549b --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.docker/config.php.dist @@ -0,0 +1,75 @@ + base64_encode(json_encode([ + 'database' => [ + [ + 'host' => 'db', + 'path' => 'magento2', + 'password' => 'magento2', + 'username' => 'magento2', + 'port' => '3306', + 'type' => 'mysql:10.2' + ] + ], + 'redis' => [ + [ + 'host' => 'redis', + 'port' => '6379', + 'type' => 'redis:5.0' + ] + ], + 'elasticsearch' => [ + [ + 'host' => 'elasticsearch', + 'port' => '9200', + 'type' => 'elasticsearch:6.5' + ] + ], + 'opensearch' => [ + [ + 'host' => 'opensearch', + 'port' => '9200', + 'type' => 'opensearch:2.3' + ] + ] + ])), + 'MAGENTO_CLOUD_ROUTES' => base64_encode(json_encode([ + 'http://magento2.docker/' => [ + 'type' => 'upstream', + 'original_url' => 'http://{default}' + ], + 'https://magento2.docker/' => [ + 'type' => 'upstream', + 'original_url' => 'https://{default}' + ] + ])), + 'MAGENTO_CLOUD_VARIABLES' => base64_encode(json_encode([ + 'ADMIN_EMAIL' => 'admin@example.com', + 'ADMIN_PASSWORD' => '123123q', + 'ADMIN_URL' => 'admin' + ])), + 'MAGENTO_CLOUD_APPLICATION' => base64_encode(json_encode([ + 'hooks' => [ + + ], + 'mounts' => [ + 'var' => [ + 'path' => 'var', + 'orig' => 'shared:files/var' + ], + 'app/etc' => [ + 'path' => 'app/etc', + 'orig' => 'shared:files/etc' + ], + 'pub/media' => [ + 'path' => 'pub/media', + 'orig' => 'shared:files/media' + ], + 'pub/static' => [ + 'path' => 'pub/static', + 'orig' => 'shared:files/static' + ] + ] + ])), +]; diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento.app.yaml new file mode 100644 index 00000000..2c4f919c --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento.app.yaml @@ -0,0 +1,30 @@ +name: magento + +type: php:8.0 +build: + flavor: composer + +runtime: + extensions: + - redis + - xsl + - json + - newrelic + - sodium + +relationships: + database: "mysql:mysql" + redis: "redis:redis" + elasticsearch: "elasticsearch:elasticsearch" + opensearch: "opensearch:opensearch" + +mounts: + "var": "shared:files/var" + "app/etc": "shared:files/etc" + "pub/media": "shared:files/media" + "pub/static": "shared:files/static" + +crons: + cronrun: + spec: "* * * * *" + cmd: "php bin/magento cron:run" diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento/services.yaml b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento/services.yaml new file mode 100644 index 00000000..cad17cb8 --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2.3_cli/.magento/services.yaml @@ -0,0 +1,22 @@ +mysql: + type: mysql:10.2 + disk: 2048 + +redis: + type: redis:5.0 + +elasticsearch: + type: elasticsearch:6.5 + disk: 1024 + configuration: + plugins: + - plugin_1 + - plugin_2 + +opensearch: + type: opensearchsearch:1.1 + disk: 512 + configuration: + plugins: + - plugin_3 + - plugin_4 diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/composer.json b/src/Test/Integration/_files/cloud_base_os_2.3_cli/composer.json new file mode 100644 index 00000000..6ed415ed --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2.3_cli/composer.json @@ -0,0 +1,6 @@ +{ + "name": "magento/project-enterprise-edition", + "description": "Composer file for integration tests", + "type": "project", + "version": "2.2.0" +} diff --git a/src/Test/Integration/_files/cloud_base_os_2.3_cli/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_os_2.3_cli/docker-compose.exp.yml new file mode 100644 index 00000000..d0f17348 --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2.3_cli/docker-compose.exp.yml @@ -0,0 +1,236 @@ +version: '2.1' +services: + db: + hostname: db.magento2.docker + image: 'mariadb:10.2' + shm_size: 2gb + environment: + - MYSQL_ROOT_PASSWORD=magento2 + - MYSQL_DATABASE=magento2 + - MYSQL_USER=magento2 + - MYSQL_PASSWORD=magento2 + ports: + - '3306' + volumes: + - '.docker/mnt:/mnt:rw,delegated' + - '.docker/mysql/mariadb.conf.d:/etc/mysql/mariadb.conf.d' + - 'magento-magento-db:/var/lib/mysql' + - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' + healthcheck: + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' + interval: 30s + timeout: 30s + retries: 3 + networks: + magento: + aliases: + - db.magento2.docker + redis: + hostname: redis.magento2.docker + image: 'redis:5.0' + volumes: + - /data + ports: + - 6379 + sysctls: + net.core.somaxconn: 1024 + ulimits: + nproc: 65535 + nofile: + soft: 20000 + hard: 40000 + healthcheck: + test: 'redis-cli ping || exit 1' + interval: 30s + timeout: 30s + retries: 3 + networks: + magento: + aliases: + - redis.magento2.docker + elasticsearch: + hostname: elasticsearch.magento2.docker + image: 'magento/magento-cloud-docker-elasticsearch:6.5-1.2.0' + ulimits: + memlock: + soft: -1 + hard: -1 + environment: + - cluster.name=docker-cluster + - bootstrap.memory_lock=true + - 'ES_PLUGINS=plugin_1 plugin_2' + networks: + magento: + aliases: + - elasticsearch.magento2.docker + opensearch: + hostname: opensearch.magento2.docker + image: 'magento/magento-cloud-docker-opensearch:2.3-1.2.0' + ulimits: + memlock: + soft: -1 + hard: -1 + environment: + - cluster.name=docker-cluster + - discovery.type=single-node + - discovery.seed_hosts=opensearch + - bootstrap.memory_lock=true + - DISABLE_SECURITY_PLUGIN=true + - 'OS_PLUGINS=plugin_3 plugin_4' + networks: + magento: + aliases: + - opensearch.magento2.docker + fpm: + hostname: fpm.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + networks: + magento: + aliases: + - fpm.magento2.docker + depends_on: + db: + condition: service_healthy + web: + hostname: web.magento2.docker + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + environment: + - WITH_XDEBUG=0 + - NGINX_WORKER_PROCESSES=1 + - NGINX_WORKER_CONNECTIONS=1024 + networks: + magento: + aliases: + - web.magento2.docker + depends_on: + fpm: + condition: service_started + varnish: + hostname: varnish.magento2.docker + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' + networks: + magento: + aliases: + - varnish.magento2.docker + depends_on: + web: + condition: service_started + tls: + hostname: tls.magento2.docker + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' + extends: generic + networks: + magento: + aliases: + - magento2.docker + environment: + - NGINX_WORKER_PROCESSES=1 + - NGINX_WORKER_CONNECTIONS=1024 + - UPSTREAM_HOST=varnish + - UPSTREAM_PORT=80 + ports: + - '80:80' + - '443:443' + depends_on: + varnish: + condition: service_started + generic: + hostname: generic.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + env_file: ./.docker/config.env + environment: + - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' + - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' + build: + hostname: build.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + extends: generic + volumes: + - '.:/app:rw,delegated' + - 'magento-vendor:/app/vendor:rw,delegated' + - 'magento-generated:/app/generated:rw,delegated' + - '~/.composer/cache:/composer/cache:rw,delegated' + networks: + magento-build: + aliases: + - build.magento2.docker + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + elasticsearch: + condition: service_healthy + opensearch: + condition: service_healthy + deploy: + hostname: deploy.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + networks: + magento: + aliases: + - deploy.magento2.docker + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + elasticsearch: + condition: service_healthy + opensearch: + condition: service_healthy + mailhog: + hostname: mailhog.magento2.docker + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' + ports: + - '1025:1025' + - '8025:8025' + networks: + magento: + aliases: + - mailhog.magento2.docker +volumes: + magento-vendor: { } + magento-generated: { } + magento-var: { } + magento-app-etc: { } + magento-pub-media: { } + magento-pub-static: { } + magento-magento-db: { } +networks: + magento: + driver: bridge + magento-build: + driver: bridge diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/.docker/.gitignore b/src/Test/Integration/_files/cloud_base_os_2_cli/.docker/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/.docker/config.php.dist b/src/Test/Integration/_files/cloud_base_os_2_cli/.docker/config.php.dist new file mode 100644 index 00000000..f0e88e79 --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2_cli/.docker/config.php.dist @@ -0,0 +1,75 @@ + base64_encode(json_encode([ + 'database' => [ + [ + 'host' => 'db', + 'path' => 'magento2', + 'password' => 'magento2', + 'username' => 'magento2', + 'port' => '3306', + 'type' => 'mysql:10.2' + ] + ], + 'redis' => [ + [ + 'host' => 'redis', + 'port' => '6379', + 'type' => 'redis:5.0' + ] + ], + 'elasticsearch' => [ + [ + 'host' => 'elasticsearch', + 'port' => '9200', + 'type' => 'elasticsearch:6.5' + ] + ], + 'opensearch' => [ + [ + 'host' => 'opensearch', + 'port' => '9200', + 'type' => 'opensearch:2' + ] + ] + ])), + 'MAGENTO_CLOUD_ROUTES' => base64_encode(json_encode([ + 'http://magento2.docker/' => [ + 'type' => 'upstream', + 'original_url' => 'http://{default}' + ], + 'https://magento2.docker/' => [ + 'type' => 'upstream', + 'original_url' => 'https://{default}' + ] + ])), + 'MAGENTO_CLOUD_VARIABLES' => base64_encode(json_encode([ + 'ADMIN_EMAIL' => 'admin@example.com', + 'ADMIN_PASSWORD' => '123123q', + 'ADMIN_URL' => 'admin' + ])), + 'MAGENTO_CLOUD_APPLICATION' => base64_encode(json_encode([ + 'hooks' => [ + + ], + 'mounts' => [ + 'var' => [ + 'path' => 'var', + 'orig' => 'shared:files/var' + ], + 'app/etc' => [ + 'path' => 'app/etc', + 'orig' => 'shared:files/etc' + ], + 'pub/media' => [ + 'path' => 'pub/media', + 'orig' => 'shared:files/media' + ], + 'pub/static' => [ + 'path' => 'pub/static', + 'orig' => 'shared:files/static' + ] + ] + ])), +]; diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_os_2_cli/.magento.app.yaml new file mode 100644 index 00000000..2c4f919c --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2_cli/.magento.app.yaml @@ -0,0 +1,30 @@ +name: magento + +type: php:8.0 +build: + flavor: composer + +runtime: + extensions: + - redis + - xsl + - json + - newrelic + - sodium + +relationships: + database: "mysql:mysql" + redis: "redis:redis" + elasticsearch: "elasticsearch:elasticsearch" + opensearch: "opensearch:opensearch" + +mounts: + "var": "shared:files/var" + "app/etc": "shared:files/etc" + "pub/media": "shared:files/media" + "pub/static": "shared:files/static" + +crons: + cronrun: + spec: "* * * * *" + cmd: "php bin/magento cron:run" diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/.magento/services.yaml b/src/Test/Integration/_files/cloud_base_os_2_cli/.magento/services.yaml new file mode 100644 index 00000000..cad17cb8 --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2_cli/.magento/services.yaml @@ -0,0 +1,22 @@ +mysql: + type: mysql:10.2 + disk: 2048 + +redis: + type: redis:5.0 + +elasticsearch: + type: elasticsearch:6.5 + disk: 1024 + configuration: + plugins: + - plugin_1 + - plugin_2 + +opensearch: + type: opensearchsearch:1.1 + disk: 512 + configuration: + plugins: + - plugin_3 + - plugin_4 diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/composer.json b/src/Test/Integration/_files/cloud_base_os_2_cli/composer.json new file mode 100644 index 00000000..6ed415ed --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2_cli/composer.json @@ -0,0 +1,6 @@ +{ + "name": "magento/project-enterprise-edition", + "description": "Composer file for integration tests", + "type": "project", + "version": "2.2.0" +} diff --git a/src/Test/Integration/_files/cloud_base_os_2_cli/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_os_2_cli/docker-compose.exp.yml new file mode 100644 index 00000000..50b71d7a --- /dev/null +++ b/src/Test/Integration/_files/cloud_base_os_2_cli/docker-compose.exp.yml @@ -0,0 +1,236 @@ +version: '2.1' +services: + db: + hostname: db.magento2.docker + image: 'mariadb:10.2' + shm_size: 2gb + environment: + - MYSQL_ROOT_PASSWORD=magento2 + - MYSQL_DATABASE=magento2 + - MYSQL_USER=magento2 + - MYSQL_PASSWORD=magento2 + ports: + - '3306' + volumes: + - '.docker/mnt:/mnt:rw,delegated' + - '.docker/mysql/mariadb.conf.d:/etc/mysql/mariadb.conf.d' + - 'magento-magento-db:/var/lib/mysql' + - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' + healthcheck: + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' + interval: 30s + timeout: 30s + retries: 3 + networks: + magento: + aliases: + - db.magento2.docker + redis: + hostname: redis.magento2.docker + image: 'redis:5.0' + volumes: + - /data + ports: + - 6379 + sysctls: + net.core.somaxconn: 1024 + ulimits: + nproc: 65535 + nofile: + soft: 20000 + hard: 40000 + healthcheck: + test: 'redis-cli ping || exit 1' + interval: 30s + timeout: 30s + retries: 3 + networks: + magento: + aliases: + - redis.magento2.docker + elasticsearch: + hostname: elasticsearch.magento2.docker + image: 'magento/magento-cloud-docker-elasticsearch:6.5-1.2.0' + ulimits: + memlock: + soft: -1 + hard: -1 + environment: + - cluster.name=docker-cluster + - bootstrap.memory_lock=true + - 'ES_PLUGINS=plugin_1 plugin_2' + networks: + magento: + aliases: + - elasticsearch.magento2.docker + opensearch: + hostname: opensearch.magento2.docker + image: 'magento/magento-cloud-docker-opensearch:2.4-1.2.0' + ulimits: + memlock: + soft: -1 + hard: -1 + environment: + - cluster.name=docker-cluster + - discovery.type=single-node + - discovery.seed_hosts=opensearch + - bootstrap.memory_lock=true + - DISABLE_SECURITY_PLUGIN=true + - 'OS_PLUGINS=plugin_3 plugin_4' + networks: + magento: + aliases: + - opensearch.magento2.docker + fpm: + hostname: fpm.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + networks: + magento: + aliases: + - fpm.magento2.docker + depends_on: + db: + condition: service_healthy + web: + hostname: web.magento2.docker + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + environment: + - WITH_XDEBUG=0 + - NGINX_WORKER_PROCESSES=1 + - NGINX_WORKER_CONNECTIONS=1024 + networks: + magento: + aliases: + - web.magento2.docker + depends_on: + fpm: + condition: service_started + varnish: + hostname: varnish.magento2.docker + image: 'magento/magento-cloud-docker-varnish:6.6-1.2.0' + networks: + magento: + aliases: + - varnish.magento2.docker + depends_on: + web: + condition: service_started + tls: + hostname: tls.magento2.docker + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' + extends: generic + networks: + magento: + aliases: + - magento2.docker + environment: + - NGINX_WORKER_PROCESSES=1 + - NGINX_WORKER_CONNECTIONS=1024 + - UPSTREAM_HOST=varnish + - UPSTREAM_PORT=80 + ports: + - '80:80' + - '443:443' + depends_on: + varnish: + condition: service_started + generic: + hostname: generic.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + env_file: ./.docker/config.env + environment: + - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' + - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' + build: + hostname: build.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + extends: generic + volumes: + - '.:/app:rw,delegated' + - 'magento-vendor:/app/vendor:rw,delegated' + - 'magento-generated:/app/generated:rw,delegated' + - '~/.composer/cache:/composer/cache:rw,delegated' + networks: + magento-build: + aliases: + - build.magento2.docker + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + elasticsearch: + condition: service_healthy + opensearch: + condition: service_healthy + deploy: + hostname: deploy.magento2.docker + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' + extends: generic + volumes: + - '.:/app:ro,delegated' + - 'magento-vendor:/app/vendor:ro,delegated' + - 'magento-generated:/app/generated:ro,delegated' + - 'magento-var:/app/var:rw,delegated' + - 'magento-app-etc:/app/app/etc:rw,delegated' + - 'magento-pub-media:/app/pub/media:rw,delegated' + - 'magento-pub-static:/app/pub/static:rw,delegated' + - '.docker/mnt:/mnt:rw,delegated' + networks: + magento: + aliases: + - deploy.magento2.docker + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + elasticsearch: + condition: service_healthy + opensearch: + condition: service_healthy + mailhog: + hostname: mailhog.magento2.docker + image: 'magento/magento-cloud-docker-mailhog:1.0-1.2.0' + ports: + - '1025:1025' + - '8025:8025' + networks: + magento: + aliases: + - mailhog.magento2.docker +volumes: + magento-vendor: { } + magento-generated: { } + magento-var: { } + magento-app-etc: { } + magento-pub-media: { } + magento-pub-static: { } + magento-magento-db: { } +networks: + magento: + driver: bridge + magento-build: + driver: bridge diff --git a/src/Test/Integration/_files/cloud_base_test/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_test/.magento.app.yaml index 13ccc132..003f041a 100644 --- a/src/Test/Integration/_files/cloud_base_test/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_test/.magento.app.yaml @@ -1,6 +1,6 @@ name: mymagento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml index 0585618f..a8f32c1b 100644 --- a/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_test/docker-compose.exp.yml @@ -17,7 +17,9 @@ services: - 'mymagento-magento-db:/var/lib/mysql' - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -51,7 +53,7 @@ services: - redis.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -72,7 +74,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -107,7 +109,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -126,7 +128,7 @@ services: condition: service_started test: hostname: test.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -150,7 +152,7 @@ services: condition: service_healthy fpm_xdebug: hostname: fpm_xdebug.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -173,13 +175,13 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium zookeeper' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -197,7 +199,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -220,7 +222,7 @@ services: condition: service_healthy cron: hostname: cron.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic command: run-cron environment: diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/.magento.app.yaml index aeaadbd0..b9e57185 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/.magento.app.yaml @@ -1,6 +1,6 @@ name: mymagento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml index 53d8630b..da788c3e 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'mymagento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -62,7 +64,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -82,7 +84,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -116,7 +118,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -135,14 +137,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium zookeeper' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -162,7 +164,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/.magento.app.yaml index aeaadbd0..b9e57185 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/.magento.app.yaml @@ -1,6 +1,6 @@ name: mymagento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml index 428d8228..773a33d2 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_image_and_version/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'mymagento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -62,7 +64,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -82,7 +84,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -116,7 +118,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -135,14 +137,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium zookeeper' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -162,7 +164,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/.magento.app.yaml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/.magento.app.yaml index aeaadbd0..b9e57185 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/.magento.app.yaml @@ -1,6 +1,6 @@ name: mymagento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml index a38f457a..4d7bda12 100644 --- a/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_base_with_custom_zookeeper_version/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'mymagento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -62,7 +64,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -82,7 +84,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -116,7 +118,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -135,14 +137,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium zookeeper' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -162,7 +164,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_no_tls_service/.magento.app.yaml b/src/Test/Integration/_files/cloud_no_tls_service/.magento.app.yaml index 0fae6f4b..0dac5bfe 100644 --- a/src/Test/Integration/_files/cloud_no_tls_service/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_no_tls_service/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml index e29152a7..3f38882e 100644 --- a/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_tls_service/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -63,7 +65,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -83,7 +85,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -119,14 +121,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -146,7 +148,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/.magento.app.yaml b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/.magento.app.yaml index 0fae6f4b..0dac5bfe 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml index fe34a339..33757293 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_varnish_and_tls_service/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -63,7 +65,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -83,7 +85,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -109,14 +111,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -136,7 +138,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/cloud_no_varnish_service/.magento.app.yaml b/src/Test/Integration/_files/cloud_no_varnish_service/.magento.app.yaml index 0fae6f4b..0dac5bfe 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_service/.magento.app.yaml +++ b/src/Test/Integration/_files/cloud_no_varnish_service/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml b/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml index 519258d7..5c791f8b 100644 --- a/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/cloud_no_varnish_service/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -63,7 +65,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -83,7 +85,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -107,7 +109,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -126,14 +128,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -153,7 +155,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml index 2b9e82d2..0a9f3b9f 100644 --- a/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_base/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -26,7 +28,7 @@ services: - db.magento2.test fpm: hostname: fpm.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -46,7 +48,7 @@ services: condition: service_healthy web: hostname: web.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -80,7 +82,7 @@ services: condition: service_started tls: hostname: tls.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -99,14 +101,14 @@ services: condition: service_started generic: hostname: generic.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -122,7 +124,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml index 2b9e82d2..0a9f3b9f 100644 --- a/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_base_native/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -26,7 +28,7 @@ services: - db.magento2.test fpm: hostname: fpm.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -46,7 +48,7 @@ services: condition: service_healthy web: hostname: web.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -80,7 +82,7 @@ services: condition: service_started tls: hostname: tls.magento2.test - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -99,14 +101,14 @@ services: condition: service_started generic: hostname: generic.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -122,7 +124,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.test - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml index 5bd8a9e7..6549599d 100644 --- a/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_custom_images/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -84,7 +86,7 @@ services: condition: service_healthy web: hostname: web.magento2.test - image: 'nginx-v1:1.19' + image: 'nginx-v1:1.24' extends: generic volumes: - '.:/app:ro,delegated' @@ -119,7 +121,7 @@ services: condition: service_started tls: hostname: tls.magento2.test - image: 'nginx-v1:1.19' + image: 'nginx-v1:1.24' extends: generic networks: magento: diff --git a/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml index f2b4ae19..95a7c3d7 100644 --- a/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_no_tls_service/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -25,7 +27,7 @@ services: - db.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -41,7 +43,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -73,13 +75,13 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -95,7 +97,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_cloud_no_varnish_and_tls_services/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_no_varnish_and_tls_services/docker-compose.exp.yml index 026a62e1..086e6ebd 100644 --- a/src/Test/Integration/_files/custom_cloud_no_varnish_and_tls_services/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_no_varnish_and_tls_services/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -25,7 +27,7 @@ services: - db.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -41,7 +43,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -63,13 +65,13 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -85,7 +87,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_cloud_no_varnish_service/docker-compose.exp.yml b/src/Test/Integration/_files/custom_cloud_no_varnish_service/docker-compose.exp.yml index 0de6c3ab..f91ef529 100644 --- a/src/Test/Integration/_files/custom_cloud_no_varnish_service/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_cloud_no_varnish_service/docker-compose.exp.yml @@ -15,7 +15,9 @@ services: - '.docker/mnt:/mnt:rw,delegated' - 'magento-magento-db:/var/lib/mysql' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -25,7 +27,7 @@ services: - db.magento2.docker fpm: hostname: fpm.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-fpm-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -41,7 +43,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -61,7 +63,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: 'magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: 'magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -80,13 +82,13 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium' build: hostname: build.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -102,7 +104,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: 'magento/magento-cloud-docker-php:7.2-cli-1.2.0' + image: 'magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Integration/_files/custom_registry/.magento.app.yaml b/src/Test/Integration/_files/custom_registry/.magento.app.yaml index 0fae6f4b..0dac5bfe 100644 --- a/src/Test/Integration/_files/custom_registry/.magento.app.yaml +++ b/src/Test/Integration/_files/custom_registry/.magento.app.yaml @@ -1,6 +1,6 @@ name: magento -type: php:7.3 +type: php:8.0 build: flavor: composer diff --git a/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml b/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml index 74f1e281..e498a0f6 100644 --- a/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml +++ b/src/Test/Integration/_files/custom_registry/docker-compose.exp.yml @@ -17,7 +17,9 @@ services: - 'magento-magento-db:/var/lib/mysql' - '.docker/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d' healthcheck: - test: 'mysqladmin ping -h localhost -pmagento2' + test: + - CMD-SHELL + - '(mariadb-admin ping -h localhost -pmagento2 || mysqladmin ping -h localhost -pmagento2)' interval: 30s timeout: 30s retries: 3 @@ -65,7 +67,7 @@ services: - elasticsearch.magento2.docker fpm: hostname: fpm.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-php:7.3-fpm-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-php:8.0-fpm-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -85,7 +87,7 @@ services: condition: service_healthy web: hostname: web.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' @@ -119,7 +121,7 @@ services: condition: service_started tls: hostname: tls.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-nginx:1.19-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-nginx:1.24-1.2.0' extends: generic networks: magento: @@ -138,14 +140,14 @@ services: condition: service_started generic: hostname: generic.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-php:8.0-cli-1.2.0' env_file: ./.docker/config.env environment: - 'PHP_EXTENSIONS=bcmath bz2 calendar exif gd gettext intl mysqli pcntl pdo_mysql soap sockets sysvmsg sysvsem sysvshm opcache zip xsl sodium redis' - 'SENDMAIL_PATH=/usr/local/bin/mhsendmail --smtp-addr=mailhog:1025' build: hostname: build.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:rw,delegated' @@ -165,7 +167,7 @@ services: condition: service_healthy deploy: hostname: deploy.magento2.docker - image: '123.example.com/magento/magento-cloud-docker-php:7.3-cli-1.2.0' + image: '123.example.com/magento/magento-cloud-docker-php:8.0-cli-1.2.0' extends: generic volumes: - '.:/app:ro,delegated' diff --git a/src/Test/Unit/Config/Dist/GeneratorTest.php b/src/Test/Unit/Config/Dist/GeneratorTest.php index 32b5df70..8af337d2 100644 --- a/src/Test/Unit/Config/Dist/GeneratorTest.php +++ b/src/Test/Unit/Config/Dist/GeneratorTest.php @@ -190,25 +190,36 @@ public function testGenerate(): void 'exported_application_value', ] ]); + + $expectedCalls = [ + [ + $rootDir . '/config.php.dist', + $this->getConfigForUpdate(), + ], + [ + $rootDir . '/config.env', + 'MAGENTO_CLOUD_RELATIONSHIPS=base64_relationship_value' . PHP_EOL + . 'MAGENTO_CLOUD_ROUTES=base64_routes_value' . PHP_EOL + . 'MAGENTO_CLOUD_VARIABLES=base64_variables_value' . PHP_EOL + . 'MAGENTO_CLOUD_APPLICATION=base64_application_value' . PHP_EOL, + ], + ]; + $this->filesystemMock->expects($this->exactly(2)) ->method('put') - ->withConsecutive( - [$rootDir . '/config.php.dist', $this->getConfigForUpdate()], - [ - $rootDir . '/config.env', - 'MAGENTO_CLOUD_RELATIONSHIPS=base64_relationship_value' . PHP_EOL - . 'MAGENTO_CLOUD_ROUTES=base64_routes_value' . PHP_EOL - . 'MAGENTO_CLOUD_VARIABLES=base64_variables_value' . PHP_EOL - . 'MAGENTO_CLOUD_APPLICATION=base64_application_value' . PHP_EOL + ->willReturnCallback(function ($file, $content) use (&$expectedCalls) { + $expectedCall = array_shift($expectedCalls); - ] - ); + $this->assertSame($expectedCall[0], $file); + $this->assertSame($expectedCall[1], $content); + }); $this->distGenerator->generate($config); } /** * @return string + * @SuppressWarnings("PHPMD.UnusedPrivateMethod") */ private function getConfigForUpdate(): string { diff --git a/src/Test/Unit/Config/RelationshipTest.php b/src/Test/Unit/Config/RelationshipTest.php index 9c359d98..7def0faf 100644 --- a/src/Test/Unit/Config/RelationshipTest.php +++ b/src/Test/Unit/Config/RelationshipTest.php @@ -46,6 +46,12 @@ class RelationshipTest extends TestCase 'port' => '6379' ] ], + 'valkey' => [ + [ + 'host' => 'cache', + 'port' => '6379' + ] + ], 'elasticsearch' => [ [ 'host' => 'elasticsearch', @@ -90,6 +96,7 @@ public function testGet() { $mysqlVersion = '10.4'; $redisVersion = '5.2'; + $valkeyVersion = '8.0'; $esVersion = '7.7'; $osVersion = '1.1'; $rmqVersion = '3.5'; @@ -97,42 +104,80 @@ public function testGet() $configWithType = $this->defaultConfigs; $configWithType['database'][0]['type'] = "mysql:$mysqlVersion"; $configWithType['redis'][0]['type'] = "redis:$redisVersion"; + $configWithType['valkey'][0]['type'] = "valkey:$valkeyVersion"; $configWithType['elasticsearch'][0]['type'] = "elasticsearch:$esVersion"; $configWithType['opensearch'][0]['type'] = "opensearch:$osVersion"; $configWithType['rabbitmq'][0]['type'] = "rabbitmq:$rmqVersion"; $configWithType['zookeeper'][0]['type'] = "zookeeper:$zookeeperVersion"; - $this->configMock->expects($this->exactly(8)) + $this->configMock->expects($this->exactly(9)) ->method('hasServiceEnabled') - ->withConsecutive( - [ServiceInterface::SERVICE_DB], - [ServiceInterface::SERVICE_DB_QUOTE], - [ServiceInterface::SERVICE_DB_SALES], - ['redis'], - ['elasticsearch'], - ['opensearch'], - ['rabbitmq'], - ['zookeeper'] - ) - ->willReturnOnConsecutiveCalls(true, false, false, true, true, true, true, true); - $this->configMock->expects($this->exactly(6)) + ->willReturnCallback(function ($service) { + static $services = [ + ServiceInterface::SERVICE_DB, + ServiceInterface::SERVICE_DB_QUOTE, + ServiceInterface::SERVICE_DB_SALES, + 'redis', + 'valkey', + 'elasticsearch', + 'opensearch', + 'rabbitmq', + 'zookeeper' + ]; + + static $responses = [ + true, + false, + false, + true, + true, + true, + true, + true, + true + ]; + + $expectedService = array_shift($services); + $expectedResponse = array_shift($responses); + + $this->assertSame($expectedService, $service); + + return $expectedResponse; + }); + + $services = [ + ServiceInterface::SERVICE_DB, + 'redis', + 'valkey', + 'elasticsearch', + 'opensearch', + 'rabbitmq', + 'zookeeper' + ]; + + $versions = [ + $mysqlVersion, + $redisVersion, + $valkeyVersion, + $esVersion, + $osVersion, + $rmqVersion, + $zookeeperVersion + ]; + + $this->configMock->expects($this->exactly(7)) ->method('getServiceVersion') - ->withConsecutive( - [ServiceInterface::SERVICE_DB], - ['redis'], - ['elasticsearch'], - ['opensearch'], - ['rabbitmq'], - ['zookeeper'] - ) - ->willReturnOnConsecutiveCalls( - $mysqlVersion, - $redisVersion, - $esVersion, - $osVersion, - $rmqVersion, - $zookeeperVersion - ); + ->willReturnCallback(function ($service) use ( + &$services, + &$versions + ) { + $expectedService = array_shift($services); + $expectedVersion = array_shift($versions); + + $this->assertSame($expectedService, $service); + + return $expectedVersion; + }); $this->assertEquals($configWithType, $this->relationship->get($this->configMock)); } diff --git a/tests/functional/Codeception/Docker.php b/tests/functional/Codeception/Docker.php index 9ed7a70a..ac65e51d 100644 --- a/tests/functional/Codeception/Docker.php +++ b/tests/functional/Codeception/Docker.php @@ -23,7 +23,7 @@ class Docker extends BaseModule /** * @var array */ - protected $config = [ + protected array $config = [ 'system_magento_dir' => '', 'printOutput' => false, ]; @@ -31,12 +31,12 @@ class Docker extends BaseModule /** * @var array */ - protected $services = []; + protected array $services = []; /** * @inheritdoc */ - public function _initialize() + public function _initialize(): void { $container = Robo::createDefaultContainer(); $builder = CollectionBuilder::create($container, $this); diff --git a/tests/functional/Codeception/MagentoDb.php b/tests/functional/Codeception/MagentoDb.php index be5d5d6b..c8dd9d6c 100644 --- a/tests/functional/Codeception/MagentoDb.php +++ b/tests/functional/Codeception/MagentoDb.php @@ -113,7 +113,7 @@ public function _beforeStep(Step $step) /** * @inheritdoc */ - public function _after(TestInterface $test) + public function _after(TestInterface $test): void { $this->disconnectDatabases(); } @@ -122,17 +122,17 @@ public function _after(TestInterface $test) * This method is overridden to avoid connection attempts before running Docker * {@inheritdoc} */ - public function _initialize() {} + public function _initialize(): void {} /** * This method is overridden to avoid connection attempts before running Docker * {@inheritdoc} */ - public function _beforeSuite($settings = []) {} + public function _beforeSuite($settings = []): void {} /** * This method is overridden to avoid connection attempts before running Docker * {@inheritdoc} */ - public function _before(TestInterface $test) {} + public function _before(TestInterface $test): void {} } diff --git a/tests/functional/Robo/Tasks/CopyToDocker.php b/tests/functional/Robo/Tasks/CopyToDocker.php index 5e3cf0c3..a1d6d8b3 100644 --- a/tests/functional/Robo/Tasks/CopyToDocker.php +++ b/tests/functional/Robo/Tasks/CopyToDocker.php @@ -80,7 +80,7 @@ public function destination(string $destination): self public function getCommand(): string { return sprintf( - 'docker cp %s "$(docker-compose ps -q %s)":%s', + 'docker cp "$(docker-compose ps -q %s)":%s %s', $this->source, $this->container, $this->destination diff --git a/tests/integration/Container.php b/tests/integration/Container.php index 8052c2b2..001c10b2 100644 --- a/tests/integration/Container.php +++ b/tests/integration/Container.php @@ -29,7 +29,7 @@ class Container extends \Magento\CloudDocker\App\Container public static function getInstance( string $root, string $magentoBasePath, - string $toolsBasePath = null + ?string $toolsBasePath = null ): self { $key = crc32($root . $magentoBasePath . $toolsBasePath); diff --git a/tests/integration/phpunit.xml.dist b/tests/integration/phpunit.xml.dist index 36126fde..9a217f08 100644 --- a/tests/integration/phpunit.xml.dist +++ b/tests/integration/phpunit.xml.dist @@ -1,7 +1,7 @@ @@ -12,14 +12,11 @@ ../../src/Test/Unit - - - ../../src - - ../../src/Test - - - + + + ../../src + +