Magento2
Magento2 copied to clipboard
Production Mode vs Developer Mode
As this project is advertised as "Docker Image to Magento 2 local development in Mac, Linux and Windows" I am wondering why it is setup to run in production
mode? After running the initial installation I had to go in and clear all compilation and static content and switch to developer
mode so I could begin development. Is there a particular reason this is setup for production mode?
Having the option to set the mode could be a solution if it depends on the user's use-case.
It is very easy to change. Use ./magento deploy:mode:set developer
Then you will get errors. Simply run ./composer update
and you are up and running in Dev mode
@JackWormUK Yes I am aware how to change the deploy mode in Magento, and that is what I did to get it working. The purpose of this issue was to request the ability to set this from the beginning as to avoid needing to perform this extra step. In install-magento line 36 it explicitly sets production mode. I just don't see why this is necessary as this is advertised as a local development environment. If anything it should explicitly set developer
mode.
But the better option I believe would be to provide an optional prompt, ENV variable, or some other way to configure this before running the install script that will tell it which mode to set.
@rain2o I don't disagree with you. It would be nice if at the very end it switched over to developer mode using the 2 command above.
I only commented here to help out others who may wish to switch over to developer mode by giving them the quick and easy way to do it.
@JackWormUK I has break all layout after try this command to set to develop mode php bin/magento deploy:mode:set developer
after access ./shell -> var/www/html.
And now using your command is fine when run it in MYMAGENTO2 folder, not in ./shell.
But i have so say, this project is the best docker for osx i try!!!