Devilbox: Magento 2.3 install

Created on 25 Jan 2019  路  7Comments  路  Source: cytopia/devilbox

ISSUE TYPE

  • Bug Report

OS / ENVIRONMENT

  1. Host operating system and version:
    UBUNTU 10.10
  1. Docker version:
    18.09.1
  2. Docker Compose version:
    1.21.0
  3. (Linux) Is SELinux enabled?:
    No
  4. What git commit hash are you on?:

Whatever is most recent.

SUMMARY

While attempting to install magento 2.3. /setup page crashes browser.

https://magento.stackexchange.com/questions/104313/magento-2-setup-freezes-browser (essentially this issue).

Even 777'ing the whole project doesnt resolve issue.

I can get around this fist error bump by installing via command line

https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli.html

After the install completes, the page actually loads (the html bones of page), but all of the assets from /pub/static/ are returned as 404's

STEPS TO REPRODUCE

Follow these steps
https://devilbox.readthedocs.io/en/latest/examples/setup-magento2.html

EXPECTED BEHAVIOUR

ACTUAL BEHAVIOUR

OTHER INFORMATION

Start command

$ docker-compose up...

File and user permissions (Linux & MacOS)

$ id uid=1000(rhys) gid=1000(rhys) groups=1000(rhys),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),118(lpadmin),129(sambashare)

$ ls -la
drwxr-xr-x 17 rhys rhys  4096 Jan 24 22:21 .
drwxr-xr-x  3 rhys rhys  4096 Jan 24 22:20 ..
drwxr-xr-x  2 rhys rhys  4096 Jan 24 22:20 autostart
drwxr-xr-x  3 rhys rhys  4096 Jan 24 22:31 backups
drwxr-xr-x  2 rhys rhys  4096 Jan 24 22:20 bash
drwxr-xr-x  2 rhys rhys  4096 Jan 24 22:31 ca
drwxr-xr-x 48 rhys rhys  4096 Jan 24 22:20 cfg
drwxr-xr-x  2 rhys rhys  4096 Jan 24 22:20 compose
-rw-r--r--  1 rhys rhys   894 Jan 24 22:20 CONTRIBUTING.md
drwxr-xr-x  7 rhys rhys  4096 Jan 24 22:20 data
drwxr-xr-x  4 rhys rhys  4096 Jan 24 22:20 .devilbox
-rw-r--r--  1 rhys rhys   743 Jan 24 22:20 docker-compose.override.yml-example
-rw-r--r--  1 rhys rhys 12815 Jan 24 22:20 docker-compose.yml
drwxr-xr-x 19 rhys rhys  4096 Jan 24 22:20 docs
-rw-r--r--  1 rhys rhys 17222 Jan 24 23:35 .env
-rw-r--r--  1 rhys rhys 17222 Jan 24 22:20 env-example
drwxr-xr-x  8 rhys rhys  4096 Jan 24 22:20 .git
drwxr-xr-x  3 rhys rhys  4096 Jan 24 22:20 .github
-rw-r--r--  1 rhys rhys  3656 Jan 24 22:20 .gitignore
-rw-r--r--  1 rhys rhys  1064 Jan 24 22:20 LICENSE.md
drwxr-xr-x  8 rhys rhys  4096 Jan 24 22:31 log
drwxr-xr-x  2 rhys rhys  4096 Jan 24 22:31 mail
drwxr-xr-x  8 rhys rhys  4096 Jan 24 22:20 mod
-rw-r--r--  1 rhys rhys 55047 Jan 24 22:20 README.md
-rw-r--r--  1 rhys rhys    86 Jan 24 22:20 shell.bat
-rwxr-xr-x  1 rhys rhys    59 Jan 24 22:20 shell.sh
drwxr-xr-x  5 rhys rhys  4096 Jan 24 22:20 .tests
-rw-r--r--  1 rhys rhys  9510 Jan 24 22:20 .travis.yml
-rwxr-xr-x  1 rhys rhys  2375 Jan 24 22:20 update-docker.sh

drwxr-xr-x 3 rhys rhys 4096 Jan 24 23:46 .
drwxr-xr-x 7 rhys rhys 4096 Jan 24 22:20 ..
-rw-r--r-- 1 rhys rhys    0 Jan 24 22:20 .keepme
drwxr-xr-x 3 rhys rhys 4096 Jan 24 23:52 magetest

bug

Most helpful comment

switching from nginx to the apache2.4 container seems to have solved all my issues. feel free to close

All 7 comments

switching from nginx to the apache2.4 container seems to have solved all my issues. feel free to close

@msyhr thanks for the bug report. I will still try to reproduce and figure out why Nginx does not work with it.

Here happens similar occurrence when the Atom editor is open, then close the same it is loaded as expected

Not sure why Magento requires separate users for cli and webserver: https://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-sys-perms-over.html

I've got it to successfully run on OSX with the default nginx container, so I'm not sure if that's the issue. I will be testing this some more tonight on my ubuntu desktop at home. The static-content deployment is unbelievably slow on docker for mac (750seconds compared to 60ish on ubuntu), hence my interest is moving out mage2 team over to a linux setup.

Another thing I noticed when I first couldn't get the nginx working was that the unsigned urls for the static content were working.

https://devdocs.magento.com/guides/v2.3/config-guide/cache/static-content-signing.html

For instance

http://magento2.loc/pub/static/version1475604434/frontend/Magento/luma/en_US/images/logo.svg
would 404, but

http://magento2.com/pub/static/version/frontend/Magento/luma/en_US/images/logo.svg
returned the correct css/image/etc file.

I have had some issues in the past with incorrectly configured servers breaking those file permission when you run this:

https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-static-view.html

@msyhr

The static-content deployment is unbelievably slow on docker for mac (750seconds compared to 60ish on ubuntu), hence my interest is moving out mage2 team over to a linux setup.

Have a look at this: https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html#osx-performance. It should at least double the Performance on MacOS.
To really overcome the MacOS issue is by adding docker-sync: https://github.com/cytopia/devilbox/issues/105

Another thing I noticed when I first couldn't get the nginx working was that the unsigned urls for the static content were working.

https://devdocs.magento.com/guides/v2.3/config-guide/cache/static-content-signing.html

For instance

http://magento2.loc/pub/static/version1475604434/frontend/Magento/luma/en_US/images/logo.svg
would 404, but

http://magento2.com/pub/static/version/frontend/Magento/luma/en_US/images/logo.svg
returned the correct css/image/etc file.

@msyhr I could imagine that Magento has .htaccess files in place that handle a lot of the URL rewriting. .htaccess does not work for Nginx, so I would recommend to try it out with Apache 2.4 and see if that works. If it does I can have a look at what config you will need to adjust for Nginx.

@msyhr I made some further investigation into this issue and it seems that this is indeed due to the default .htaccess files that are provided by Magento. Nginx is not able to apply them, as it does not have such concept.

I've updated the documentation accordingly to use Apache 2.4 for the install and added a link to an example how to get this working with Nginx.

See here: https://devilbox.readthedocs.io/en/latest/examples/setup-magento2.html#requirements

Thanks again for catching this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StanMenten99 picture StanMenten99  路  6Comments

cytopia picture cytopia  路  4Comments

mwmichael picture mwmichael  路  3Comments

fkaminski picture fkaminski  路  4Comments

drupalshift picture drupalshift  路  5Comments