Magento2 icon indicating copy to clipboard operation
Magento2 copied to clipboard

Production Mode vs Developer Mode

Open rain2o opened this issue 5 years ago • 5 comments

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.

rain2o avatar Apr 27 '19 10:04 rain2o

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 avatar Jun 18 '19 12:06 JackWormUK

@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 avatar Jun 18 '19 12:06 rain2o

@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 avatar Jun 20 '19 02:06 JackWormUK

@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.

fchienvuhoang avatar Nov 18 '19 14:11 fchienvuhoang

But i have so say, this project is the best docker for osx i try!!!

fchienvuhoang avatar Nov 18 '19 14:11 fchienvuhoang