magento / magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
Open Software License 3.0
253 stars 191 forks source link

Developer mode workflow #318

Open drpayyne opened 3 years ago

drpayyne commented 3 years ago

Preconditions

  1. Use Magento Cloud Docker in developer mode

Steps to reproduce

  1. Follow steps in https://devdocs.magento.com/cloud/docker/docker-mode-developer.html to use cloud-docker in dev mode

Expected result

  1. Developers shouldn't have to run docker-compose run --rm deploy magento-command deploy:mode:set developer every time after cloud-deploy when docker-compose file was generated for developer mode. This sets the flag MAGE_MODE=developer. This should be used in cloud-deploy scenario to set the mode as developer instead of production, if present. I don't understand why we can't use that flag to set the deploy mode. Or another flag in probably .docker/config.env, in case the MAGE_MODE flag is meant only for the docker containers.

Actual result

  1. We have to set the deploy:mode to developer after every run of cloud deploy even if build:compose was run with developer flag since cloud-deploy always sets mode to production no matter the environment mode. During development, this seems unnecessary.
drpayyne commented 3 years ago

Yes, this isn't as simple as fixing the scenario to use the MAGE_MODE flag since this has implications on processes like setup:di:compile and setup:static-content:deploy.

shiftedreality commented 3 years ago

We probably can add a new command/flag to https://github.com/magento/magento-cloud-docker/blob/develop/dist/bin/magento-docker and switch this after successful deployment.

Volunteer needed

shiftedreality commented 3 years ago

Internal issue: https://jira.corp.magento.com/browse/MCLOUD-7991