├── .docker ├── build.properties └── install-shopware.sh ├── .gitattributes ├── Dockerfile ├── README.md ├── build.sh ├── docker-compose.yml └── run.sh /.docker/build.properties: -------------------------------------------------------------------------------- 1 | # Hostname e.g. example.com 2 | app.host = shopware.local.docker 3 | # Path 4 | app.path = 5 | 6 | # Database credentials 7 | db.name = shopware 8 | db.host = 127.0.0.1 9 | db.user = docker 10 | db.password = docker 11 | db.port = 3306 12 | 13 | test.dir = ${basedir}/tests 14 | test.dir.shopware = ${test.dir}/Shopware 15 | 16 | build.dir = ${basedir}/build 17 | log.dir = ${build.dir}/logs 18 | sql.dir = ${basedir}/_sql 19 | cache.dir = ${basedir}/var/cache 20 | app.dir = ${basedir}/engine/Shopware 21 | 22 | karma.config = ${basedir}/themes/Frontend/Responsive/karma.conf.js 23 | 24 | script.php = php 25 | script.phpcs = phpcs 26 | script.phpmd = phpmd 27 | script.phpcpd = phpcpd 28 | script.phploc = phploc 29 | script.pdepend = pdepend 30 | script.phpcb = phpcb 31 | script.mysql = mysql 32 | script.phpunit = ${basedir}/vendor/bin/phpunit 33 | script.behat = ${basedir}/vendor/bin/behat 34 | script.karma = karma 35 | 36 | script.server.start = ${build.dir}/server/start_server 37 | script.server.stop = ${build.dir}/server/stop_server 38 | 39 | demo.data = ${sql.dir}/demo/latest.sql -------------------------------------------------------------------------------- /.docker/install-shopware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bash /opt/docker/scripts/start-mysql.sh 4 | 5 | bash /opt/docker/scripts/start-mysql.sh 6 | echo "MySQL:" 7 | 8 | RET=1 9 | while [[ RET -ne 0 ]]; do 10 | echo "=> Connection established?" 11 | sleep 5 12 | mysql -udocker -pdocker -e "status" #> /dev/null 2>&1 13 | RET=$? 14 | done 15 | 16 | start=$(date +%s) 17 | 18 | mysql -udocker -pdocker -e "CREATE DATABASE IF NOT EXISTS shopware DEFAULT CHARACTER SET = 'utf8' DEFAULT COLLATE 'utf8_general_ci';" 19 | 20 | echo "Shopware:" 21 | git clone https://github.com/shopware/shopware.git /var/www/shopware 22 | 23 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" 24 | php composer-setup.php 25 | php -r "unlink('composer-setup.php');" 26 | chmod +x composer.phar 27 | php composer.phar global require hirak/prestissimo 28 | 29 | chmod -Rf 0777 /var/www/shopware/var 30 | chmod -Rf 0777 /var/www/shopware/web 31 | chmod -Rf 0777 /var/www/shopware/files 32 | chmod -Rf 0777 /var/www/shopware/media 33 | chmod -Rf 0777 /var/www/shopware/engine/Shopware/Plugins/Community 34 | 35 | cp /opt/shopware/build.properties /var/www/shopware/build/ 36 | 37 | cd /var/www/shopware/ 38 | git checkout 5.6 39 | 40 | cd /var/www/shopware/build 41 | ant build-unit 42 | 43 | cd /var/www/shopware 44 | wget -O test_images.zip http://releases.s3.shopware.com/test_images.zip 45 | unzip test_images.zip 46 | 47 | echo "Add var-dumper" 48 | php composer.phar require symfony/var-dumper --no-interaction --optimize-autoloader 49 | 50 | echo "Generate Theme" 51 | php bin/console sw:theme:cache:generate 52 | 53 | echo "media migrate - fix for: images are not showing on the page" 54 | php bin/console sw:media:migrate 55 | 56 | chmod 0777 /var/www/shopware/config.php 57 | chmod -Rf 0777 /var/www/shopware/var/cache 58 | chmod -Rf 0777 /var/www/shopware/web 59 | 60 | echo "Set permissions" 61 | chown -Rf www-data:www-data /var/www 62 | 63 | 64 | end=$(date +%s) 65 | runtime=$(python -c "print '%u:%02u' % ((${end} - ${start})/60, (${end} - ${start})%60)") 66 | 67 | echo "---------" 68 | echo "Runtime: ${runtime}" 69 | echo "---------" 70 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sh eol=lf -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nxswesolowski/ubuntu-php:7.2 2 | MAINTAINER Rafal Wesolowski 3 | 4 | ADD .docker /opt/shopware 5 | RUN /opt/shopware/install-shopware.sh 6 | 7 | 8 | EXPOSE 22 80 3306 9000 9 | CMD ["supervisord", "-n"] 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shopware with Docker 2 | 3 | Url: 4 | 5 | ## Init 6 | 7 | First step: 8 | 9 | ``` 10 | bash build.sh 11 | ``` 12 | 13 | Second step: 14 | ``` 15 | bash run.sh 16 | ``` 17 | 18 | After start the windows - start Docker-Toolbox and run 19 | ``` 20 | docker start shopware 21 | ``` 22 | 23 | #### Version: 24 | 25 | PHP: 7 26 | MySQL: 5.6 27 | Shopware: current 28 | 29 | #### SSH 30 | Host: 192.168.99.100 31 | Login: docker 32 | Password: docker 33 | Port: 2222 34 | Path to shop: /var/www/shopware 35 | 36 | #### Database 37 | Host: 192.168.99.100 38 | Local-Host: 127.0.0.1 39 | Login: docker 40 | Password: docker 41 | Port: 3306 42 | 43 | 44 | ### Youtube - Deutsch [DE]: 45 | 46 | [![01. Shopware 5 | Docker - Windows [DE]](https://i.ytimg.com/vi/Uk6dSL66M5o/hqdefault.jpg)](https://youtu.be/Uk6dSL66M5o "01. Shopware 5 | Docker - Windows [DE]") 47 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker build -t nxswesolowski/shopware . 4 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | 5 | shopware: 6 | image: nxswesolowski/shopware 7 | volumes: 8 | - ./:/var/www/shopware 9 | ports: 10 | - "80:80" 11 | - "3336:3306" 12 | - "2222:22" 13 | 14 | 15 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker run --name shopware -d -p 80:80 -p 2222:22 -p 3306:3306 wesolowski/shopware-php72 4 | --------------------------------------------------------------------------------