dbjpanda / drupal-devops

Drupal 8 devops workflow using Docker, Ansible, Composer and GIt . Developed in Google summer of Code 2018
4 stars 6 forks source link

Syncronize your production database and development database #2

Open dbjpanda opened 6 years ago

dbjpanda commented 6 years ago

Data should flow downtoward always. That is Production to Development. And it should be fully automated . I guess currently we are committing our databse dump to git from server side. But it is not a good idea. Github is source control not for data. And data may grow dynamically. Rsync may help in this case. But it is old technique. Find out something effective.

Chiranjeeb2410 commented 6 years ago

Working on this one. Also could you be a bit more specific on the db perspective?

dbjpanda commented 6 years ago

" more specific " . I think I have already specified. Can you ask your question what you want to know ?

Chiranjeeb2410 commented 6 years ago

Got the info from #9. Thanks

dbjpanda commented 6 years ago

It has been since 2 days. No update. It is not a task of 2 days. Ankit has completed more than 5 tasks and you have not completed 1 yet.

Chiranjeeb2410 commented 6 years ago

Sorry for being late. Was preoccupied in some other tasks. Will post a solution by tonight.

Chiranjeeb2410 commented 6 years ago

Keeping in mind the production-development database sync, if the db in staging becomes comparatively more updated than the one in dev, it would lead on to anomalies in local development. To address this issue, we could create scripts to update the local db dump from the production/remote db, whilst readying to deploy the latest changes to the production server. This might be achieved by taking inputs from this project: https://github.com/scottjs/db-sync. Also, utilities such as Composer would come in handy as we're already using it within Docker. This would be a good way to automatize the process.

We might need to write change scripts (schema/data change) for each feature we work on and not simply dump the entire database into source control as @dbjpanda said. These scripts will upgrade the current production database to the new version in development. The build process can restore a copy of the production database into an appropriate environment and run all the scripts from source control on it, which will update the local database to the current version.

dbjpanda commented 6 years ago

We might need to write change scripts

Who ??

Chiranjeeb2410 commented 6 years ago

Me and Ankit could collectively work on it.

dbjpanda commented 6 years ago

Why collaboratively ? I can see, you have just done nothing. No PR yet from you. No code yet. So forget about Ankit simply. And for your kind information I don't consider your "comments on the issue" as your contribution . This issue has been opened 8 days ago .

Chiranjeeb2410 commented 6 years ago

Apologies. Will do it myself since I posted the solution.

On Thu, 17 May 2018, 05:12 Dibyajyoti Panda, notifications@github.com wrote:

Why collaboratively ? I can see, you have just done nothing. No PR yet from you. No code yet. So forget about Ankit simply. And for your kind information I don't consider your "comments on the issue" as your contribution . This issue has been opened 8 days ago .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dbjpanda/drupal-devops/issues/2#issuecomment-389699627, or mute the thread https://github.com/notifications/unsubscribe-auth/ATjDA-1XkOpOTz8plMFNNKSGYlcvjfyMks5tzLlkgaJpZM4T3OBp .