Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to use when 'development' means development in Heroku pipeline #183

Closed
danielmcquillen opened this issue Jun 24, 2020 · 2 comments
Closed

Comments

@danielmcquillen
Copy link

Sorry if this is obvious and I'm just missing it!

'development' seems reserved for the local database. How would you configure parity if one wants development restore-from production to copy the heroku production database to the heroku development server in a pipeline and something like local restore-from production to copy it to the local db.

I imagine defining 'local' and 'development' in the database.yml is a step in that direction, but then confused as to how I'd invoke parity on the command line if the first term is an (arbitrary) name like 'local' defined in the database.yml.

Many thanks for the helpful tool!

@geoffharcourt
Copy link
Collaborator

Hi!

Heroku strongly advises against putting production data in review application databases (I think you're talking about review apps when you're talking about development servers?).

Copying full database contents to a Review apps is not currently supported. Copying production data to test apps means risk of data leaks or other programming mistakes operating on recent customer data. Instead, we recommend seeding databases comprehensively with non-production data using seed scripts run with the postdeploy command.

I think if your PR apps were named using the deterministic naming structure (note: not the default in the new pipelines, but configurable) that you could leverage the pr_app command to restore a production backup. Something like this:

pr_app myapp-staging-pr-1234 restore-from production

If there's a gap here and there's a PR to make the Backup or Environment class facilitate a staging restore to a PR app database I'd be very happy to review a PR.

@danielmcquillen
Copy link
Author

@geoffharcourt Thanks for the quick response. Aha. I guess you're right, I'm trying to bend parity to do something I probs shouldn't. I'll close the issue. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants