politicalrev / political-revolution.com

The website for Political Revolution
https://political-revolution.com
11 stars 7 forks source link

Database Syncing & Configuring Environmental Differences #32

Closed leggomuhgreggo closed 6 years ago

leggomuhgreggo commented 7 years ago

Overview:

There are three environments: Production, Staging, and Dev. The docker image powering the dev environment generates its DB from a .sql file that, currently, we export manually from prod/staging. We'd like to propagate database updates more fluidly, perhaps through a cron job or some other low friction method.

To be prudent about data security, we'd only want to port tables with non-sensitive information, which I believe indicates a some custom sql code, and probably also environmental tests in config files.

If anyone has any experience and would like to chime in their recommendations/be assigned the task, it would be much appreciated!

Oh, one little thing that occurred to me was to consider what implications environment tests might have for build scripts, just so we're striving for consistency.

Potential Dev DB/Congic Differences to Consider:

Type Comments
Users Could either have generic user accounts, or pull selected dev accounts from prod, or a combo. Might also consider feature specific accounts/privileges
Plugins & Keys Want to make sure any plugins that store API keys are handled properly, and also any function that could affect live (like sending to an email list) get disabled--maybe mapped to a blackhole port
Media Want to makes sure images/video point to wherever live is sourcing them mainly to avoid bloating the image with huge stores of media files.
SEO We'd want to consider any plugin that might affect SEO. I'd think it's possibly not a concern where a local environment is concerned, but certainly want to be mindful that we're not risking duplicate content penalties or publishing other non-strategic content

*I suspect I've overlooked certain aspects or could improve the organization. I'll aim to incorporate additional info from any comments.

Solution:

Thanks!

Smona commented 7 years ago

I don't think duplicate content will be a worry, and media is already being pointed to prod with w3tc.