From 375810a703f95664ef2b1172ca72c6d7a292ab95 Mon Sep 17 00:00:00 2001 From: Vladislav Sultanov Date: Fri, 19 Nov 2021 15:36:26 +0100 Subject: [PATCH 1/2] Add shopware 56 support --- bin/sdRunInTest.sh | 2 +- bin/sdTest.sh | 2 +- docker-compose56.yml | 74 +++++++++++++++++++++++++++++++++++++++ nginx/conf.d/default.conf | 22 ++++++++++++ 4 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 docker-compose56.yml diff --git a/bin/sdRunInTest.sh b/bin/sdRunInTest.sh index f9e5494..31816dc 100755 --- a/bin/sdRunInTest.sh +++ b/bin/sdRunInTest.sh @@ -7,7 +7,7 @@ SHOPWARE_VERSION=$2 for arg do shift case $arg in - (52|53|54|55) : ;; + (52|53|54|55|56) : ;; (*) set -- "$@" "$arg" ;; esac done diff --git a/bin/sdTest.sh b/bin/sdTest.sh index 441633a..73f65d2 100755 --- a/bin/sdTest.sh +++ b/bin/sdTest.sh @@ -6,7 +6,7 @@ SHOPWARE_VERSION=$2 for arg do shift case $arg in - (52|53|54|55) : ;; + (52|53|54|55|56) : ;; (*) set -- "$@" "$arg" ;; esac diff --git a/docker-compose56.yml b/docker-compose56.yml new file mode 100644 index 0000000..83a00db --- /dev/null +++ b/docker-compose56.yml @@ -0,0 +1,74 @@ +version: '3' + +services: + nginx: + image: nginx:1.15-alpine + environment: + - TZ=Europe/Berlin + ports: + - "56872:56872" + - "56873:56873" + volumes: + - shopware56_php72:/var/www/shopware56_php72:delegated + - shopware56_php73:/var/www/shopware56_php73:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./nginx/include.shopware.conf:/etc/nginx/include.shopware.conf + - ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf + links: + - shopware56_php72 + - shopware56_php73 + - mysql + depends_on: + - shopware56_php72 + - shopware56_php73 + + shopware56_php72: + image: solutiondrive/docker-shopware-container:shopware5.6.7-php7.2 + environment: + - TZ=Europe/Berlin + - DB_DATABASE=shopware56_php72 + - WEB_HOST=localhost:56872 + volumes: + - shopware56_php72:/var/www/shopware56_php72:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-override-php.ini + - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf + links: + - mysql + depends_on: + - mysql + + shopware56_php73: + image: solutiondrive/docker-shopware-container:shopware5.6.7-php7.3 + environment: + - TZ=Europe/Berlin + - DB_DATABASE=shopware56_php73 + - WEB_HOST=localhost:56873 + volumes: + - shopware56_php73:/var/www/shopware56_php73:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-override-php.ini + - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf + links: + - mysql + depends_on: + - mysql + + mysql: + image: mysql:5.7.20 + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_ALLOW_EMPTY_PASSWORD=false + - MYSQL_DATABASE=test + ports: + - "56331:3306" + + mailhog: + image: mailhog/mailhog:v1.0.0 + ports: + - "8055:8025" + +volumes: + shopware56_php72: + shopware56_php73: diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 7fe272c..a4ef3fd 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -162,3 +162,25 @@ server { include /etc/nginx/include.shopware.conf; } + +server { + server_name localhost; + listen 56872; + + #access_log /var/logs/nginx_access.log; + root /var/www/shopware56_php72; + set $fastcgi_pass shopware56_php72:9000; + + include /etc/nginx/include.shopware.conf; +} + +server { + server_name localhost; + listen 56873; + + #access_log /var/logs/nginx_access.log; + root /var/www/shopware56_php73; + set $fastcgi_pass shopware56_php73:9000; + + include /etc/nginx/include.shopware.conf; +} From d81a97601919ffe4c21db27ad81d5d00ec5f4bd6 Mon Sep 17 00:00:00 2001 From: Vladislav Sultanov Date: Fri, 4 Feb 2022 09:15:11 +0100 Subject: [PATCH 2/2] Add shopware 57 support --- README.md | 26 ++++++----- bin/sdRunInTest.sh | 2 +- bin/sdTest.sh | 2 +- docker-compose57.yml | 95 +++++++++++++++++++++++++++++++++++++++ nginx/conf.d/default.conf | 33 ++++++++++++++ 5 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 docker-compose57.yml diff --git a/README.md b/README.md index 3d79341..ee0506d 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ add the following dependency to your project's composer.json's require-dev secti Then do a `composer update` or use `composer require --dev` instead. -To initialize the testing environment, e.g. for Shopware 5.4.x simply run the following: +To initialize the testing environment, e.g. for Shopware 5.7.x simply run the following: - vendor/bin/sdTest.sh init 54 + vendor/bin/sdTest.sh init 57 This will create some files: @@ -43,23 +43,23 @@ Handle plugin ------------- For all following commands you must pass a php and shopware version, -e.g. 71 for PHP 7.1 container and 54 for Shopware 5.4 : +e.g. 74 for PHP 7.4 container and 57 for Shopware 5.7 : For adding the plugin run: - vendor/bin/sdPlugin.sh 71 54 add + vendor/bin/sdPlugin.sh 74 57 add For removing the plugin run: - vendor/bin/sdPlugin.sh 71 54 remove + vendor/bin/sdPlugin.sh 74 57 remove For activating the plugin run: - vendor/bin/sdPlugin.sh 71 54 activate + vendor/bin/sdPlugin.sh 74 57 activate For deactivating the plugin run: - vendor/bin/sdPlugin.sh 71 54 deactivate + vendor/bin/sdPlugin.sh 74 57 deactivate Controlling the testing environment @@ -70,10 +70,12 @@ List of SHOPWARE_VERSION: - 53 -> v5.3.x - 54 -> v5.4.x - 55 -> v5.5.x +- 56 -> v5.6.x +- 57 -> v5.7.x -To start the containers e.g. with shopware 5.4 and get back your local shell just run: +To start the containers e.g. with shopware 5.7 and get back your local shell just run: - vendor/bin/sdTest.sh start 54 + vendor/bin/sdTest.sh start 57 To stop the containers run: @@ -131,10 +133,10 @@ Executing a command in the testing environment ---------------------------------------------- Commands (for example to clear the cache or to run the setup) can be executed inside the container. -You must give a version of php and shopware to execute command on, e.g. 71 for PHP 7.1 container and 54 for Shopware 5.4.x: +You must give a version of php and shopware to execute command on, e.g. 74 for PHP 7.4 container and 57 for Shopware 5.7.x: - vendor/bin/sdRunInTest.sh 71 54 ./app/install.sh + vendor/bin/sdRunInTest.sh 74 57 ./app/install.sh If you want to you can even get a shell inside the PHP container: - vendor/bin/sdRunInTest.sh 71 54 /bin/bash + vendor/bin/sdRunInTest.sh 74 57 /bin/bash diff --git a/bin/sdRunInTest.sh b/bin/sdRunInTest.sh index 31816dc..12d629c 100755 --- a/bin/sdRunInTest.sh +++ b/bin/sdRunInTest.sh @@ -7,7 +7,7 @@ SHOPWARE_VERSION=$2 for arg do shift case $arg in - (52|53|54|55|56) : ;; + (52|53|54|55|56|57) : ;; (*) set -- "$@" "$arg" ;; esac done diff --git a/bin/sdTest.sh b/bin/sdTest.sh index 73f65d2..09a69c5 100755 --- a/bin/sdTest.sh +++ b/bin/sdTest.sh @@ -6,7 +6,7 @@ SHOPWARE_VERSION=$2 for arg do shift case $arg in - (52|53|54|55|56) : ;; + (52|53|54|55|56|57) : ;; (*) set -- "$@" "$arg" ;; esac diff --git a/docker-compose57.yml b/docker-compose57.yml new file mode 100644 index 0000000..8761008 --- /dev/null +++ b/docker-compose57.yml @@ -0,0 +1,95 @@ +version: '3' + +services: + nginx: + image: nginx:1.15-alpine + environment: + - TZ=Europe/Berlin + ports: + - "57874:57874" + - "57880:57880" + - "57881:57881" + volumes: + - shopware57_php74:/var/www/shopware57_php74:delegated + - shopware57_php80:/var/www/shopware57_php80:delegated + - shopware57_php81:/var/www/shopware57_php81:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./nginx/include.shopware.conf:/etc/nginx/include.shopware.conf + - ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf + links: + - shopware57_php74 + - shopware57_php80 + - shopware57_php81 + - mysql + depends_on: + - shopware57_php74 + - shopware57_php80 + - shopware57_php81 + + shopware57_php74: + image: solutiondrive/docker-shopware-container:shopware5.7.7-php7.4 + environment: + - TZ=Europe/Berlin + - DB_DATABASE=shopware57_php74 + - WEB_HOST=localhost:57874 + volumes: + - shopware57_php74:/var/www/shopware57_php74:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-override-php.ini + - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf + links: + - mysql + depends_on: + - mysql + + shopware57_php80: + image: solutiondrive/docker-shopware-container:shopware5.7.7-php8.0 + environment: + - TZ=Europe/Berlin + - DB_DATABASE=shopware57_php80 + - WEB_HOST=localhost:57880 + volumes: + - shopware57_php80:/var/www/shopware57_php80:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-override-php.ini + - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf + links: + - mysql + depends_on: + - mysql + + shopware57_php81: + image: solutiondrive/docker-shopware-container:shopware5.7.7-php8.1 + environment: + - TZ=Europe/Berlin + - DB_DATABASE=shopware57_php81 + - WEB_HOST=localhost:57881 + volumes: + - shopware57_php81:/var/www/shopware57_php81:delegated + - ${PROJECT_DIR}:/opt/host:delegated + - ./php/php.ini:/usr/local/etc/php/conf.d/zzz-override-php.ini + - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf + links: + - mysql + depends_on: + - mysql + + mysql: + image: mysql:5.7.20 + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_ALLOW_EMPTY_PASSWORD=false + - MYSQL_DATABASE=test + ports: + - "56331:3306" + + mailhog: + image: mailhog/mailhog:v1.0.0 + ports: + - "8055:8025" + +volumes: + shopware57_php74: + shopware57_php80: + shopware57_php81: diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index a4ef3fd..3f688b0 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -184,3 +184,36 @@ server { include /etc/nginx/include.shopware.conf; } + +server { + server_name localhost; + listen 57874; + + #access_log /var/logs/nginx_access.log; + root /var/www/shopware57_php74; + set $fastcgi_pass shopware57_php74:9000; + + include /etc/nginx/include.shopware.conf; +} + +server { + server_name localhost; + listen 57880; + + #access_log /var/logs/nginx_access.log; + root /var/www/shopware57_php80; + set $fastcgi_pass shopware57_php80:9000; + + include /etc/nginx/include.shopware.conf; +} + +server { + server_name localhost; + listen 57881; + + #access_log /var/logs/nginx_access.log; + root /var/www/shopware57_php81; + set $fastcgi_pass shopware57_php81:9000; + + include /etc/nginx/include.shopware.conf; +}