Giter VIP home page Giter VIP logo

dockware's Introduction

Dockware

MIT licensed

Shopware 6 Preview

Hi guys, thanks for visiting the dockware project (www.dockware.io)

What is dockware?

dockware is a managed Shopware 6 docker image.

Run and explore any Shopware 6 version within minutes locally in Docker. No more hassle and blazing fast! With dockware it's easy to explore Shopware and start developing in a smooth and seamless environment!

Quick reference

Where to get help: https://www.dockware.io

Where to file issues: https://www.dockware.io

Documentation: https://dockware.io/docs

Maintained by: dasistweb GmbH (https://www.dasistweb.de)

More about Shopware: https://www.shopware.com

Shopware Platform on Github: https://github.com/shopware/platform

Where to get support?

If you have a issue or a feature Request, pls use Github.

If you need help and have general questions please use our slack channel in the Shopware Community Slack. https://slack.shopware.com use the channel #dockware. Shopware Slack #dockware to the Channel

How to contribute?

Dockware is built with Orca (www.orca-build.io).

Please use the provided makefile to install dependencies, and to generate the Dockerfiles for building and testing.

If you create new features and changes, please always keep in mind, where to add your modifications.

If you want to create features for all images and tags, then use the global template. Otherwise please add your changes in either the corresponding image or even on a "tag" level.

How do releases work?!

Dockware is indeed a new type of project...and we finally figured out a way to manage releases for you.

New dockware releases work almost the same as traditional projects. The only difference is, that a support for a new Shopware version is not in the scope of a release.

So what is a release then?

A dockware release consists of new features, fixes and improvements across the full set of tags of all image or specific images.

Example:

We add a new logging application to all dockware/dev tags, that's a new release.

We add a new Shopware 6.x version...thats not a new release!

All changes can be found in the CHANGELOG.md file.

This file is also embedded within the image, when we build it (/var/www)

When you launch your dockware container, it should also output its version number in "docker logs" so you can verify what features and fixes you should have.

In addition to this, GitHub users can search for tags and releases in our repository. The GitHub releases will also included the built ORCA distribution files, which are not included in the repository, to avoid divergent versions.

When will a release be available?

As soon as we create a new official release, we trigger our building pipelines on Github.

All official images including their last publishing date can be found at https://dockware.io/images

Creating a new Shopware Version

At the moment the step to add a new Shopware version is to manually create a few files, but it's still very easy.

  • Add 2 new folders to variants/play and variants/dev (just copy the previous release). Then open the variables.json in each folder and adjust the Shopware Version, as well as the Download URL.

  • Afterwards, add the new entries in the manifest.json. Please don't forget to move the alias "latest" to the correct version.

  • Now open the file build/WorkflowBuilder/Constant.php and adjust the correct latest Shopware version. This is for Cypress double verifications.

  • Then open the build folder in your CLI and run "make generate-tests" to also create new SVRUnit tests.

  • Also adjust the Github workflows to build all required images.

That's it! You can now commit your changes.

License

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

dockware's People

Contributors

arosenhagen avatar beberlei avatar boxblinkracer avatar donderda avatar flohs avatar flowl avatar fpesch avatar frederikdengler avatar jissereitsma avatar jonas-resch avatar kleinmann avatar m-arcus avatar macster84 avatar martinweinmayr avatar ocarthon avatar schmitzcarsten avatar suc-sgor avatar tschaefermedia avatar uehler avatar wexotht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockware's Issues

Error 500

I have started docker with:

docker run --rm -p 8080:80 dockware/dev:latest

this seems to work fine. No error message.

When I open localhost:8080/admin in firefox I can login.
But when I open localhost:8080/ there is an error 500:

Oops! An Error Occurred
The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

There is an error message in /var/log/apache/other_vhosts_access.log:
localhost:80 172.17.0.1 - - [25/Feb/2021:16:33:55 +0100] "GET / HTTP/1.1" 500 1063 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
But it says nothing about the reason of the error.

In error.log or access.log there is no message.

Missing NOPASSWD for Custom SSH users

it looks like the custom SSH users do not have NOPASSWD SUDO option

i tried

docker exec -u abc container bash -C "sudo xyz"

and it required a password

docker exec bash container -c "sudo xyz"

worked

maybe we should add that to custom ssh users too if that's really missing

npm packages in Plugins

The make watch-storefront command cannot find npm packages that are imported in my custom plugin.
If i run bin/build-storefront.sh my Plugin build is successfull.

How do I import npm packages with "dockware/dev"?

How to reproduce the issue

  1. Create a custom SW6 Plugin
  2. Go to "CustomPlugin/src/Resources/app/storefront" and run npm init
  3. Install some NPM package e.g. npm install mapbox-gl --save
  4. Create a "webpack.config.js" in "CustomPlugin/src/Resources/app/storefront/build" and add the following lines
// eslint-disable-next-line func-names
module.exports = function (params) {
    return {
        resolve: {
            modules: [
                `${params.basePath}Resources/app/storefront/node_modules`
            ]
        }
    };
};
  1. Create a "src/main.js" file inside your storefront folder and import the installed npm package.
Import mapboxgl from 'mapbox-gl';
  1. If you use the default way with "https://github.com/shopware/development" you can "build" and "watch" the storefront without problems. Is Dockware ignoring the webpack.config.js in the Plugin directory and how can I use npm packages with dockware/dev?

Hope someone can help here 💙💜

Error while running watch-storefront script

While running watch-storefront, the following error occurred:
image

The compilation was still successful, but the JS files are not being loaded using port 9999:
image

This may lead to this error:
image

The sources are available as expected on localhost:9999.

System details:
Windows 10 Pro
Docker Toolbox

Dockefile

Hello everyone

I find Dockware a super interesting project! Extremely cool!

For me it serves as a source of knowledge to learn and deepen the handling of Docker based configurations.

I'm not that familiar with Twig and Orca, unfortunately. How do you create a Dockerfile from the twigs? Is it possible to send me a rendered Dockerfile?

Just to give me food for some thoughts. ;-)

I would be interested in the following configuration:

version: "3"

services:
        
    shopware:
      image: dockware/play:latest
      container_name: shopware
      ports:
         - "80:80"
      networks:
         - web
      
    db:
      image: mysql:5.7
      container_name: mysql
      networks:
        - web
      environment:
        - MYSQL_ROOT_PASSWORD=hidden
        - MYSQL_USER=shopuser
        - MYSQL_PASSWORD=secret
        - MYSQL_DATABASE=shopware

networks:
  web:
    external: false

I would be happy if this could be done....

Carsten

Notice: iconv(): Wrong charset, conversion from `utf-32le' to `utf-8' is not allowed

Describe the bug
It is impossible to run important commands on the docker machine insight the M1 Docker Apple Silicon Preview 7

To Reproduce
Open a connection to the Machine
Execute bin/console theme:change Storefront --all
See Message "Notice: iconv(): Wrong charset, conversion from utf-32le' to utf-8' is not allowed"
Command wasn't execute

Expected behavior
Command is executed without any notices or error messages

Desktop (please complete the following information):

  • OS: MacOS BigSur 11.2
  • Browser: Console
  • Running in "M1 Docker Apple Silicon Preview 7"
  • PHP 7.4.12
    [PHP Modules]
    apc
    apcu
    bcmath
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    FFI
    fileinfo
    filter
    ftp
    gd
    geoip
    gettext
    hash
    iconv
    igbinary
    intl
    json
    ldap
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_pgsql
    pgsql
    Phar
    posix
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    soap
    sockets
    sodium
    SPL
    ssh2
    standard
    sysvmsg
    sysvsem
    sysvshm
    tideways
    tokenizer
    xdebug
    xml
    xmlreader
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib

[Zend Modules]
Xdebug
Zend OPcache

Additional context
Add any other context about the problem here.

bin/console not working on a fresh `dockware/dev:latest`

Describe the bug
I used an example compose file from the docs

To Reproduce
create a docker-compose.yml

version: "3"

services:

  shopware:
    image: dockware/dev:latest
    container_name: shopware
    ports:
      - "80:80"
      - "3306:3306"
      - "22:22"
      - "8888:8888"
      - "9999:9999"
    networks:
      - web
    environment: # https://docs.dockware.io/development/environment-variables
      - XDEBUG_ENABLED=1

networks:
  web:
    external: false

Then I run

docker-compose up -d --force-recreate

The site is working alright, frontend, backend, everything.

But when I run:

docker-compose run shopware bash -c 'bin/console'

I get this:

In AbstractMySQLDriver.php line 93:             
  An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory  
                                                                                     
In PDOConnection.php line 31:
  SQLSTATE[HY000] [2002] No such file or directory  
                                                    
In PDOConnection.php line 27:
  SQLSTATE[HY000] [2002] No such file or directory  

Additional context
OS: macOS 10.14.6
Docker Engine v20.10.5

Composer 2 update?

Hello,
I have cloned https://github.com/shopware/development and wanted to do composer install. But if I do that in the container I got:

Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package composer-runtime-api ^2.0 exists as composer-runtime-api[1.0.0] but these are rejected by your constraint.
  Problem 2
    - shopware/platform 6.4.x-dev requires composer-runtime-api ^2.0 -> no matching package found.
    - shopware/platform dev-trunk requires composer-runtime-api ^2.0 -> no matching package found.
    - Installation request for shopware/platform 6.4.x@dev || dev-trunk -> satisfiable by shopware/platform[dev-trunk, 6.4.x-dev].

Would it be possible to update Composer to version 2 in the image?

dev docker-compose up crashes

Describe the bug

docker-compose up -d crashes:

ERROR: Encountered errors while bringing up the project
ERROR: for shop  Cannot start service shop: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions

To Reproduce
Steps to reproduce the behavior:

  1. create dev docker-compose.yml
  2. docker-compose up -d

Expected behavior
A dev version of shopware

Desktop (please complete the following information):

  • OS: Windows 10 Pro 19041.867
  • Browser Chrome 89.0.4389.90

watch-admin not working in dockware/contribute image

If I try to run
make watch-admin
I get

BaseUrl for proxy is set to "undefined"

 ⚠️  You need to add the "APP_URL" as an environment variable for compiling the code. ⚠️

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `mode=development webpack-dev-server "http://0.0.0.0"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/www/.npm/_logs/2020-08-11T07_30_19_654Z-debug.log
makefile:19: recipe for target 'watch-admin' failed
make: *** [watch-admin] Error 1

Container runs with docker-compose:

sw:
        image: dockware/contribute
        container_name: sw
        ports:
            - "80:80"
            - "22:22"
            # Admin Watcher Port
            - "8888:8888"
            # Storefront Watcher Port
            - "9999:9999"
        environment:
            - PHP_VERSION=7.4
            - XDEBUG_ENABLED=1
            - SW_CURRENCY=EUR
            - PHP_IDE_CONFIG=serverName=PHPStorm

Same thing works great with dockware/dev:6.1.5

Contribute: MailCatcher not working

I'm using dockware:contribute.
In Mailcatcher no eMails are, which should have been sent from shopware.

Are there any special configs have to done to get this working?
I've not found some additionals in the docs...

watch-storefront does not work anymore

Describe the bug
The watch-storefront makefile command does not work anymore since some recent version. we cannot exactly tell which version, since we used the latest image and the issue occured after a docker system prune -a today, which caused a new download of the image of course.

After some hours we found out that the .htaccess.watch file in the /html directory is no longer respected. this comes down to the fact that the apache config does not even involve this directory (anymore). moving the .htaccess.watch file to the public directory helps, but this overrides the .htaccess file then. the only real fix for us was to move the RequestHeader instructions from the .htacces.watch file in /html into the .htaccess file in /html/public

To Reproduce
Steps to reproduce the behavior:

  • Pull the latest image
  • Start the make watch-storefront command
  • Hot reload does not work

Expected behavior
Hot reload should work

watch-storefront is not detecting theme changes

Describe the bug
Changes inside a newly created theme are not detected by make watch-storefront.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new theme, e.g bin/console theme:create Darkmode
  2. Update a style of base.scss of the newly created theme
  3. Run bin/console theme:compile
  4. Open the browser and verify your style changes
  5. Start watch-storefront with make watch-storefront and wait until it's started
  6. (Similar to step 2): update a style of the newly created theme

I edited the base.scss in Visual Studio Code on my host machine (Windows) and directly on the container (with CLI and vim). In both cases were no changes detected by the watcher.

Expected behavior
I would expect that the watcher is detecting the change and the theme is compiled automatically, but nothing happens.
I have to run bin/console theme:compile manually to see my changes.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 88.0.705.81
  • Docker image version: 6.3.5.1

Screenshots
image

image

Additional context
I'm using dockware/dev with a docker-compose file and bind-mount for development.

watch-admin - APP_URL is wrong in DEV Version

Describe the bug
After I start watch-admin and upload images in Shop Experience, the images are broken.

To Reproduce

  • Start dockware #dev (6.3.5.2)
  • Start make watch-admin
  • Upload an image file in an element. The file exist, but you see a broken image.

Solution:
The broken image has a URL starts with http://0.0.0.0. That is the problem. It should be same like defined APP_URL. It's working in dockware #contribute. And I found the problem. APP_URL=http://0.0.0.0 should be replaced with APP_URL={{ shopware.url }} ?!?

dockware #dev
cd /var/www/html && APP_URL=http://0.0.0.0 PROJECT_ROOT=/var/www/html APP_ENV=dev PORT=8888 HOST=0.0.0.0 ENV_FILE=/var/www/html/.env ESLINT_DISABLE=true npm run --prefix /var/www/html/vendor/shopware/administration/Resources/app/administration dev

dockware #contribute
cd /var/www/html && PROJECT_ROOT=/var/www/html APP_URL={{ shopware.url }} ESLINT_DISABLE=true PORT=8888 HOST=0.0.0.0 ENV_FILE=/var/www/html/.env npm run --prefix vendor/shopware/platform/src/Administration/Resources/app/administration/ dev

SHOPWARE_CDN_STRATEGY_DEFAULT editable

Is your feature request related to a problem? Please describe.
We copied all media files from a production server to a local dockware container, but the system didn't find the images.
We figured out, that the production system .env file contained the env. var. SHOPWARE_CDN_STRATEGY_DEFAULT=id.
But the dockware container used the "physical_filename"-strategy by default without setting it anywhere.
After we changed the .env file in the dockware container all images where displayed after bin/build.sh.

Describe the solution you'd like
Would be great to be able to set the SHOPWARE_CDN_STRATEGY_DEFAULT in a docker-compose.yml file and shopware would use it.

Describe alternatives you've considered
Currently we have to change the .env each time.

Production Image

Is your feature request related to a problem? Please describe.
The official docker production solution from Shopware has been experimental for a year and doesn't seem to be working properly.

Describe the solution you'd like
A dockware image for productive use.

[Improvement] Add XDEBUG_SESSION_START to docs

Nice that xdebug comes preinstalled, i think it's worth mentioning in the docs that to debug any api route, e.g. with Postman, you can set a header XDEBUG_SESSION_START=PHPSTORM or append it as a get parameter. It will trigger a PHPStorm debug session.

Of course if there is any other option for it, i couldn't get the remote_autostart/connect_back_on to work.

After Shopware update - watch-admin/watch-storefront not working anymore

Hello,

after updating my Shopware local environemnt to the current 6.3.5 version via the Backend Update-Tool, i dont get the watcher working anymore.
This error i get:

www-data@1fa10e64a0f4:~$ make watch-storefront
cd /var/www/html && ./bin/build-storefront.sh
/bin/sh: 1: ./bin/build-storefront.sh: Permission denied
makefile:18: recipe for target 'watch-storefront' failed
make: *** [watch-storefront] Error 126

It seems there is a permission issue. But how can i change the permissions?

watch-admin fails

Describe the bug

After building administration, which is sucessful, the task "make watch-admin" fails with the following error. First i've got an error that APP_URL is missing, but it was present in .ENV. However this i fixed by exporting it as a shell variable.

Shopware 6.3.4.1
Dockware latest (as of today)

Content of .ENV file

SHOPWARE_ES_HOSTS="elasticsearch:9200"
SHOPWARE_ES_ENABLED="0"
SHOPWARE_ES_INDEXING_ENABLED="0"
SHOPWARE_ES_INDEX_PREFIX="sw"
SHOPWARE_HTTP_CACHE_ENABLED="1"
SHOPWARE_HTTP_DEFAULT_TTL="7200"
SHOPWARE_CDN_STRATEGY_DEFAULT="id"
BLUE_GREEN_DEPLOYMENT="1"
MAILER_URL="smtp://localhost:25?encryption=&auth_mode="
APP_ENV="dev"
APP_URL="http://localhost"
APP_SECRET="xxx"
INSTANCE_ID="yvTvvKw8ZUohuPk8HjiL8uKNrFaYHeri"
DATABASE_URL="mysql://root:root@localhost:3306/shopware"
SHOPWARE_HTTP_CACHE_ENABLED="0"
BaseUrl for proxy is set to "http://localhost"
# Plugin "Storefront": Injected successfully

ℹ 「wds」: Project is running at http://0.0.0.0:8888/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /var/www/html/vendor/shopware/administration/Resources/app/administration/static, /var/www/html/vendor/shopware/administration/Resources/app/administration/static, /var/www/html/vendor/shopware/storefront/Resources/app/administration/static


 ERROR  Failed to compile with 1 errors                                                                                                  4:29:45 PM

This dependency was not found:

* http://0.0.0.0 in multi (webpack)-dev-server/client?http://0.0.0.0:8888 http://0.0.0.0

To install it, you can run: npm install --save http://0.0.0.0
✖ 「wdm」: Time: 1259ms
Entrypoint main = static/js/runtime.js static/js/vendors-node.js static/js/main.js
   32 modules

ERROR in Entry module not found: Error: Can't resolve 'http://0.0.0.0' in '/var/www/html/vendor/shopware/administration/Resources/app/administration'

ERROR in multi (webpack)-dev-server/client?http://0.0.0.0:8888 http://0.0.0.0
Module not found: Error: Can't resolve 'http://0.0.0.0' in '/var/www/html/vendor/shopware/administration/Resources/app/administration'
ℹ 「wdm」: Failed to compile.

^Cmakefile:30: recipe for target 'watch-admin' failed
make: *** [watch-admin] Interrupt

To Reproduce
Steps to reproduce the behavior:

  1. make watch-admin

Desktop (please complete the following information):

  • OS: OS X 10.15.7

Add documentation about Security concerns

image

Like in the example today. It exposes 22. But on all interfaces. So when you work in a Public Wifi. Everyone can connecto your SSH.
Maybe all should be locally by default :)

bin/console theme:compile doesn't work

Not sure if this is related to shopware or the docker image but executing bin/console theme:compile just print out
Start theme compilation and nothing happens (execution hangs forever). The storefront assets will be missing after stopping the execution.

Running bin/build-js.sh works fine, but the "Inter" font files are always missing. I found this related shopware issue: shopware/development#59
Thats why I tried the theme:compile command 😉

essentials uses deprecated administration watch script

The essentials image has the old make command to build the administration.

this is happens accidentally because the IF condition in twig aks for shopware version > 6.3

but essentials has no shopware version,
thus the old script is used

we just need to invert the if condition, then it should work

watch-storefront script issue

hello there,

when I run the make watch-storefront command on an otherwise functioning contribute setup the following error occurs:

` ERROR Failed to compile with 1 errors 1:12:57 PM

error in /var/www/html/var/theme-entry.scss

Module build failed (from ../node_modules/sass-loader/lib/loader.js):

a&:hover {
^
  Invalid CSS after "a": expected "{", was "&"

"&" may only be used at the beginning of a compound selector.
in /var/www/html/platform/src/Storefront/Resources/app/storefront/src/scss/skin/shopware/page/checkout/_cart-item.scss (line 38, column 6)

@ /var/www/html/var/theme-entry.scss 2:14-347 21:1-42:3 22:19-352
@ multi ./src/main.js /var/www/html/custom/plugins/ManuTest/src/Resources/app/storefront/src/main.js /var/www/html/var/theme-entry.scss`

when commenting out the relevant line, the error not longer occurs and the compiling runs correctly. changes in the file are triggering the compilation, so the watcher must be active.

in both cases, though, just the html skeleton is being displayed as shown below.

Screenshot 2020-09-10 at 13 47 15

any ideas what I am missing here?
thanks

xDebug infinite page loading

How to reproduce the issue or behaviour (on Ubuntu 18.04).

  1. Create a 'docker-compose.yml'
version: "3"

services:
        
    shopware:
      image: dockware/dev:latest
      container_name: shopware
      ports:
         - "80:80"
         - "3306:3306"
         - "22:22"
         - "8888:8888"
         - "9999:9999"
      networks:
         - web
      environment:
         - XDEBUG_ENABLED=1
         - XDEBUG_REMOTE_HOST=172.17.0.1

networks:
  web:
    external: false

  1. Open terminal and start dockware with 'docker-compose up -d'
  2. Download the source code.
mkdir -p ./src
docker cp shopware:/var/www/html/. ./src
  1. Open PhpStorm and add the following settings:
    SFTP
    sftp01
    sftp02
    sftp03
    xDebug
    xdebug01
    Servers
    servers01
  2. Install 'Xdebug helper' for Chrome and set the IDE in the settings to:
    XDB01
  3. Switch to PhpStorm and set a breakpoint in src/public/index.php
    br
  4. 'Start Listening for PHP Debug Connections' by clicking the icon in the right top corner
    clicktc
  5. Open http://localhost/ in your Chrome browser and enable XDebug by clicking on the option "Debug"
  6. The Page is loading infinite and PhpStorm is not responding to the breakpoint...

Did I forget something?
Hope someone can help here 💙💜

MySQL root user not blocked

Describe the bug
MySQL root user not blocked when using custom user as described in docs.

To Reproduce

  1. Use MYSQL_USER and MYSQL_PWD as environment variables in docker-compose.yml file.
  2. Try to log in In Adminer with root user.

Expected behavior
User root shouldn't have access anymore.

Used image: dockware/dev:6.3.3.1

Can you please recheck?

Error setting a different URL

Hi! Thanks for this epic project. It helps tremendously in day to day development.

Describe the bug
We encounter a weird error when setting a custom URL.
We adjusted the entrypoint.sh for our purpose and added:
sudo echo "127.0.0.1 $2" >> /etc/hosts
sudo mysql --user=root --password=root -e "use shopware; update sales_channel_domain set url='$1' where url='http://localhost';"
After that we clear the cache with:
rm -rf /var/www/html/var/cache/*
/var/www/html/bin/console cache:clear

We also have our own .env where the APP_URL is replaced with the AWS URL.

Before we apply those changes a cURL call to localhost returns a 200. After that we get a 500 and we can not start the container.
We want to use this within Lightsail from AWS to create test instances for our shopware app.

To Reproduce
We create our own image using a custom entrypoint (which is copied from the current play version) and we added:
sudo echo "127.0.0.1 $2" >> /etc/hosts
export APP_URL=$1
sudo mysql --user=root --password=root -e "use shopware; select * from sales_channel_domain"
sudo mysql --user=root --password=root -e "use shopware; update sales_channel_domain set url='$1' where url='http://localhost';"
sudo mysql --user=root --password=root -e "use shopware; select * from sales_channel_domain"
rm -rf /var/www/html/var/cache/*
/var/www/html/bin/console cache:clear
/var/www/html/bin/console dal:refresh:index

In this case $1 and $2 are the corresponding URL and Domain from AWS Lightsail Container Service.

Expected behavior
Corresponding to the documentation and custom domains we should only update the sales_channel_domain table and the /etc/hosts. (https://dockware.io/docs#custom-domains)

Additional context
We use the container service from AWS Lightsail and create our custom image which is pushed to lightsail.

Error by initialize with Podman: `sudo: no tty present and no askpass program specified`

We have tried to launch Dockware via Podman at Profihost.

After starting the container the following error occurs:

....
*******************************************************
** DOCKWARE IMAGE: dev
** Tag: 6.3.5.0
** Version: 1.3.5-beta
** Built: Mon Feb  1 14:32:36 UTC 2021
** Copyright 2020 dasistweb GmbH
*******************************************************

launching dockware...please wait...

DOCKWARE: setting timezone to Europe/Berlin...
sudo: no tty present and no askpass program specified
$ 

After adding the user "www-data" to the sudo group (usermod -aG sudo www-data) the container is started:

....
WOHOOO, dockware/dev:6.3.5.0 IS READY :) - let's get started
-----------------------------------------------------
....

I assume that if the user www-data is added to the sudo group in the dockerfile it will work directly.
I can't estimate if this has unintended side effects.

Let me know, if you need something else from me.

Images, production and development repository question

Hi

This is more of a question, not an issue.

I am using DEV image as I will be developing more or less plugins for my shop. I see that DEV image is using Shopware production repository.

I am reading Shopware production repository readme and they are saying "If you want to contribute to the Shopware Platform or develop store plugins, you should use the development template." which is right opposite what you are suggesting - use DEV image (having production template) if you want to develop plugins.

Can you please give me some feedback on this matter?

I also noticed that if I am using production repository, I get "Cannot find declaration" in PHP file when trying to go to specific class, which is not the case with development template. Probably class definitions would come in handy while developing plugins (autocomplete, hinting etc.).

So, at the end, should I use Contribute image (having development template)?

Thank you for your answer.

psh.phar is missing

Describe the bug
After setting up the Shopware installation using dockware the psh.phar is missing.

To Reproduce
Use docker-compose up -d with the following docker-compose.yml taken from https://docs.shopware.com/en/shopware-platform-dev-en/system-guide/system-installation-guides/dockware:

version: "3"

services:

  shopware:
    # use either tag "latest" or any other version like "6.1.5", ...
    image: dockware/dev:latest
    container_name: shopware
    ports:
      - "80:80"
      - "3306:3306"
      - "22:22"
      - "8888:8888"
      - "9999:9999"
    volumes:
      - "db_volume:/var/lib/mysql"
      - "shop_volume:/var/www/html"
    networks:
      - web
    environment:
      # default = 0, recommended to be OFF for frontend devs
      - XDEBUG_ENABLED=1
      # default = latest PHP, optional = specific version
      - PHP_VERSION=7.4

volumes:
  db_volume:
    driver: local
  shop_volume:
    driver: local

networks:
  web:
    external: false

Jump into the docker container with docker exec -it shopware /bin/bash and notice psh.phar is missing:

www-data@a7e0818b5dfb:~/html$ ./psh.phar
bash: ./psh.phar: No such file or directory

Expected behavior
After jumping into the docker container I expect to receive a list of available commands after executing ./psh.phar.

Mails are not sent with Shopware 5 image

Describe the bug
Using the Shopware 5.6.9 image I was not able to send Emails from the Shopsystem.
In the mailcatcher there where no Emails when I send them via Order-State change or test Emails via the backend.

To Reproduce
Steps to reproduce the behavior:

  1. Run dockware with the Shopware 5.6.9 image
  2. Go to the backend
  3. Send an Email via the Email-Templates -> Send test Email to Shop owner
  4. Nothing appears in the mailcatcher

Expected behavior
I would expect to see the sent Email in the mailcatcher

Additional context
I connected via ssh in the docker container and tried to use sendmail via the command line. With this everything works fine and the mail is shown in mailcatcher.

I tried different settings for the mailer in Shopware, but with no success.

Startupscripts

Is your feature request related to a problem? Please describe.
On Container startup I have to execute some commands in the container's console to fit the shopware instance to my needs.
But I have to do this manually because I haven't found a way to add custom startup scripts to Dockware.

Describe the solution you'd like
Actually, Dockware already has two startup scripts in /var/www/scripts/shopware6 that are executed in entrypoint.sh if the correct envvars are set.
Now, it would be splendid if I could mount my scripts to e.g. /var/www/scripts/custom and the entrypoint.sh would execute all scripts inside it, after the apache service is running (maybe only if a envvar is set to true).

Best regards,
Niclas

VSCode xDebug multiple Erros

When i am using xDebug in VSCode i get an error as soon as i visit localhost in my IDE.
Also the page is loading infinitely.

0MY2zZ8

When i 'Continue' the call stack there are multiple errors appearing
e7R4nwB

Am i missing something? Fairly new with xDebug but i thought if i go for a dev enviroment i should do it the right way.

Appreciate the help

Dockware contribution not working as expected

I installed the dockware/dev successfully.
As I missed the psh.phar and linked platform folder, I switched to dockware/contribution.

Afterwards I made a Plugin and activated it - so far so good.
But TWIGs within my PlugIn are not read.

So I've searched for /config/packages/twig.yaml but it's not there?!

What is wrong with my environment and what's the difference between dockware/dev and dockware/contribution?
If I use dockware/dev then psh.phar and /platform is missing...

What I'm needing is just a full dev environment with all the tools, the correct template so I'd be able to develop a theme-plugin.
As for now (with dockware/contribution) my PgligIn is installed and activated but a html-twig is not used in my plugIn, although it's in the right place:

Bildschirmfoto 2021-01-08 um 09 06 09

Watch-Admin not working with Shopware 6.4

Describe the bug
If you use the latest Shopware 6.4 version and wan't to run watch-admin there is an error: "sw-extension-error" is not registered. This is because this is hidden behind a feature flag.

To Reproduce
Steps to reproduce the behavior:

  1. Run dockware/dev:latest
  2. Connect to docker machine
  3. Run make watch-admin
  4. Open localhost:8888

Expected behavior
The administration opens

Additional context
This can be fixed when running bin/console feature:dump before running make watch-admin. Maybe this call can be included in the makefile

Watch-admin crash browser

Describe the bug
After i run watch-admin, when i try switch element in template (Shopping Experience) the browser are hangs

To Reproduce
Steps to reproduce the behavior:

  1. Create new plugin with shopping experience element
  2. Run make watch-admin
  3. In browser go to localhost:8888/0.0.0.0:8888
  4. Go to Shopping Experience -> edit template -> switch element
  5. Browser crash

Desktop (please complete the following information):

  • OS: macOS Catalina 10.15.7 ( i tried it on Windows 10 and works fine)
  • Browser: chrome and safari
  • Version: lates

dockware/dev not running in dev environment

I'm getting the dockware/dev running with 'docker run --rm -p 80:80 dockware/dev:latest'

If I try to use it in a dev environment with a docker-composer.yml (like your example in the docs) there are some errors. In case I'd able to avoid them, the apache is not responding to 'localhost' (what it did when I started the image with 'docker run --rm -p 80:80 dockware/dev:latest').

I put the docker-composer.yml file in my dev directory and started 'docker-compose up -d'.

First try: Port 22 with failure:
`ERROR: for shopware Cannot start service shopware: Ports are not available: listen tcp 0.0.0.0:22: bind: address already in use

ERROR: for shopware Cannot start service shopware: Ports are not available: listen tcp 0.0.0.0:22: bind: address already in use
ERROR: Encountered errors while bringing up the project.`

Second try (deleted the Port 22 in docker-composer.yml):
is starting but no chance to reach 'localhost'. See Apache2 error log:

[Tue Jan 05 23:44:59.645265 2021] [ssl:warn] [pid 562:tid 139933958859712] AH01906: localhost:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Tue Jan 05 23:44:59.652183 2021] [ssl:warn] [pid 563:tid 139933958859712] AH01906: localhost:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Tue Jan 05 23:44:59.653193 2021] [mpm_event:notice] [pid 563:tid 139933958859712] AH00489: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations [Tue Jan 05 23:44:59.653211 2021] [core:notice] [pid 563:tid 139933958859712] AH00094: Command line: '/usr/sbin/apache2' [Tue Jan 05 23:45:42.941078 2021] [proxy_fcgi:error] [pid 568:tid 139933522265856] [client 172.20.0.1:59302] AH01067: Failed to read FastCGI header [Tue Jan 05 23:45:42.945054 2021] [proxy_fcgi:error] [pid 568:tid 139933522265856] (104)Connection reset by peer: [client 172.20.0.1:59302] AH01075: Error dispatching request to : [Tue Jan 05 23:45:57.552416 2021] [proxy_fcgi:error] [pid 568:tid 139933513864960] [client 172.20.0.1:59306] AH01067: Failed to read FastCGI header [Tue Jan 05 23:45:57.552444 2021] [proxy_fcgi:error] [pid 568:tid 139933513864960] (104)Connection reset by peer: [client 172.20.0.1:59306] AH01075: Error dispatching request to : [Tue Jan 05 23:46:37.704680 2021] [proxy_fcgi:error] [pid 568:tid 139933497063168] [client 172.20.0.1:59314] AH01067: Failed to read FastCGI header [Tue Jan 05 23:46:37.704982 2021] [proxy_fcgi:error] [pid 568:tid 139933497063168] (104)Connection reset by peer: [client 172.20.0.1:59314] AH01075: Error dispatching request to : [Tue Jan 05 23:47:46.140053 2021] [proxy_fcgi:error] [pid 568:tid 139933480261376] [client 172.20.0.1:59318] AH01067: Failed to read FastCGI header [Tue Jan 05 23:47:46.140386 2021] [proxy_fcgi:error] [pid 568:tid 139933480261376] (104)Connection reset by peer: [client 172.20.0.1:59318] AH01075: Error dispatching request to :

All is running on Mac OS 10.15.7, Docker version 20.10.0, build 7287ab3.

Any help or issue clearance is extremely appreciated.

Cheers
Michael

PS: see docker-composer.yml attached
docker-compose.yml.zip

Think about how to handle the "latest" tag in all images

Is your feature request related to a problem? Please describe.
many users use the latest version, but don't think about the update process which docker needs.
in this case the users don't have the version they think and run into troubles.
Also its not that easy to support as you always have to ask how old the "latest" version is.

Describe the solution you'd like
idea 1: delete the "latest" tag in all images that the user always knows which version he is using

idea 2: integrate a "wget" against an api to show the users that are new version for the image and how he can handle the update.

Update Shopware within Container

Hi,

started Update via Composer update (all fine).
If I try to start the Update ua bin/console update I' m getting following error:

www-data@b93ae686f975:~/html$ bin/console update

Fatal error: Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure in /var/www/html/var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php on line 25309
Symfony\Component\ErrorHandler\Error\FatalError^ {#100
  -error: array:4 [
    "type" => 64
    "message" => "Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
    "file" => "/var/www/html/var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php"
    "line" => 25309
  ]
  #message: "Compile Error: Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
  #code: 0
  #file: "./var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php"
  #line: 25309
}
www-data@b93ae686f975:~/html$ bin/console system:update-prepare

Fatal error: Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure in /var/www/html/var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php on line 25309
Symfony\Component\ErrorHandler\Error\FatalError^ {#100
  -error: array:4 [
    "type" => 64
    "message" => "Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
    "file" => "/var/www/html/var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php"
    "line" => 25309
  ]
  #message: "Compile Error: Declaration of ContainerLNJFf1d\SnippetFileCollection_08f09cc::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
  #code: 0
  #file: "./var/cache/dev_h5b248f8afe1abaca30a02977c1c39aa3/ContainerLNJFf1d/CoreShopware_Core_KernelDevDebugContainer.php"
  #line: 25309
}

Any suggestions on this failure?

Thanks in advance!

Cheers
Micha

Dockware inside kubernetes results in an 500 Internal Server Error

I'm trying to run Dockware inside a Kubernetes Cluster (setup with k3s.io). Not for production use, but for a development environment with a shared database.

For my initial test, I'm using a minimal config to keep it as simple as possible:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: shopware-development
  labels:
    app: shopware-development
spec:
  replicas: 1
  selector:
    matchLabels:
      app: shopware-development
  template:
    metadata:
      labels:
        app: shopware-development
    spec:
      containers:
      - name: shopware-development
        image: dockware/play
        env:
        - name: APP_ENV
          value: dev

If I start the deployment, start port forwarding using kubectl port-forward <pod name> 8080:80 and open http//localhost:8080 in my browser, I'm getting the following message:

Oops! An Error Occurred The server returned a "500 Internal Server Error". Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

I've checked the container logs, the php logs (/var/log/php*), the apache2 logs (/var/log/apache2*) and the shopware logs (~/html/var/log/*) inside the container, but there is no information what is causing the internal server error.
Did I forget to check a specific location for logs?

If I run dockware on my local docker environment, everything works fine. So it's seem that's an issue with the combination of kubernetes and dockware.

Does anyone has a clue what is happening here?

Product creation fails for shops with MYSQL_USER and MYSQL_PWD set

Happy Christmas bug report!

Describe the bug
Product creation fails via new product page or import when MYSQL_USER and MYSQL_PWD are set.
The error is:
SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('root'@'%') does not exist

This seems to be related to this line where root access is restricted to localhost once a MYSQL_USER is set.
Unfortunately Shopware defines database triggers that still reference 'root@%' as definer:

  • product_purchase_prices_insert
  • product_purchase_prices_update
  • product_listing_price_update

This can be easily seen when running 'show triggers' via mysql shell.

I eventually changed the definer manually to 'root@localhost' for all triggers like outlined here.
Afterwards product creation does not yield a 500 error anymore. Also import worked like a charm.

To Reproduce
Start dockware/dev with a MYSQL_USER and MYSQL_PWD.

version: "3.8"

services:
    shopware:
        image: dockware/dev:6.3.4.0
        container_name: shopware
        networks:
            - web
        environment:
            - XDEBUG_ENABLED=0
            - MYSQL_USER=app
            - MYSQL_PWD=app

networks:
    web:
        external: false

Afterwards try to create a product either by the new product page or by import.

Expected behavior
Product creation succeeds without errors.

Desktop (please complete the following information):

  • OS: macOS Catalina
  • Browser: Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.