I have a custom 503 "site down for maintenance" page configured and I see this served publicly when I switch to maintenance mode as described here:
I have run the command
magento maintenance:enable --ip=<ip address>, which serves to create the
var/.maintenance.flag file containing my office ip address in the whitelist. I thus have M2 running in maintenance mode and I still have full access to the site.
But wait! I now wish to do some work on the site in developer mode, i.e. make code changes in xml and php files. When I switch to developer mode, this disturbs the way maintenance mode works, as it prevents the custom 503 status page from showing and instead renders a stack trace to the public! This issue is raised here, but there are no real answers to this conundrum.
What on earth is the point in having a maintenance mode that does not allow a developer to switch into "developer mode" where the caches are bypassed and we can actually do some work?! This whole setup makes no sense to me. If I leave it in production mode, I will need to manually nuke caches/static files after every change is made, which is massively impractical!
What are people doing to work on live Magento 2 sites? What is the workflow adopted to temporarily switch a live site into maintenance mode and run it in developer mode concurrently? The official Magento 2 docs seem to make no attempt to address this. Can anyone point me in the direction of some resources that explain how to put a live site into maintenance mode, then set to developer mode while still showing custom 503 page to the public?
Note: I have custom modules and theme modules that only permit changes to be made via the admin panel when the site is switched to developer mode, so I MUST be able to go into developer mode. Many thanks.