Reputation: 13667
We’re working on a large project using Git and there’s quite a few development environments. Each developer works with a local copy, there’s a test/QA environment and then the production site.
We have one file contain all the MySQL data. Is there a way, without having everybody’s MySQL setup written out, to ensure smooth deployment across the environments?
Upvotes: 1
Views: 83
Reputation: 76236
I'd have a local (i.e. non-versioned) file on each machine specifying just host+port to connect and possibly user+password and/or database if they are not the same in all environments. Than I'd either have a script or a routine in the project's startup that would write out dummy/default version of that file (i.e. localhost, default port, current username, default db name) to appropriate location so I wouldn't have to remember it's format. This would be adjusted once in each environment and kept around in that environment.
Upvotes: 1