You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Magento 2.2, it is possible to set configuration in config.php, and env.php. These are merged. I'd far prefer that things like base URLs were set up once in a file env.php.template, and then not touched after that.
At that point, your refined setup process with a shell script neatly solves this problem too.
Another option that I've persistently used on Magento 1 and Magento 2 projects is an N98-Magerun script that sets config values. I've used these on basically every project I ever ran to automate configuration setting across environments.
In app/etc/store_config, there are four files, local.n98, dev.n98, staging.n98, and production.n98.
After pulling a database dump, running the command:
These scripts with relevant environments would also run on deployments to the respective environments, and this would run in a nested fashion (so staging would run production.n98, followed by staging.n98, and dev would run these two in addition to dev.n98.
Since Magento 2.2, this is a worse solution than locking the values in env.php and config.php, but if we want to target every project we deliver, this is worth considering.
When importing DB's from anywhere -> local, I always end up needing something like the following, can we make a helper command for it?
The text was updated successfully, but these errors were encountered: