Closed AngelsDustz closed 5 years ago
Hi @AngelsDustz, what do you mean with the box is stopped and started? The docker destroyed and re-created? Do you know where the 'developer mode on and off' state is kept? Is it a file on disk or a database entry perhaps? If it is a file on disk make sure that that disk persists between your sessions, maybe you can mount a volume on that path to make that storage persistent? https://docs.docker.com/storage/volumes/
Just normal docker stop
and docker start
. I am not sure where the developer mode is kept I am thinking somewhere on a file.
The volume is mounted from /data/web/magento2
to a folder in my home directory so I could work on it.
Isn't it just a line in env.php?
MAGE_MODE' => 'default' or MAGE_MODE' => 'developer'
I remember you have to do it via the bin/magento
but I will check the file, maybe the magento binairy fails to write to the file.
Dont have access to my box atm will report back tomorrow morning.
It does appear to change the mode, but only after deleting the file and re-writing it. This might be a Magento issue rather than a Hypernode issue.
If you don't mind I want to keep the issue open a bit, if it happens again I can do some research and confirm it isn't hypernode related.
EDIT:
It does indeed set it in env.php
but it also sets some type of caching as well.
Right, after creating this issue and checking the env.php
I haven't been able to reproduce this. Let's hope it magically fixed itself.
magic :sparkles:
This issue is plain forward, basically you can set the mode with
bin/magento deploy:mode:set developer
but if the box is stopped and started again it has forgotten the developer mode and you have to re-run the command.This issue only exists for magento 2.