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

Dev dump #158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Dev dump #158

wants to merge 2 commits into from

Conversation

bamader
Copy link
Collaborator

@bamader bamader commented Nov 13, 2024

Mount a pg_dump extract to docker dev

Summary

This PR creates a .sql dump of the PG database just after the eRSD has successfully been loaded via a local docker compose run. It has been mounted into the docker dev volume to automatically run as an entrypoint script when running in dev mode.

Related Issue

Fixes #122

Additional Information

Added a readme with the command needed to create the dump file in case we ever want to update the dev dump. Code tested by nuking all images, docker system pruneing, then just running npm run dev and verifying values were in the DB via DBeaver.

Copy link
Collaborator

@m-goggins m-goggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I believe we need to mount the same volume to the db docker-compose-e2e so that the data is available for end to end tests.

@bamader
Copy link
Collaborator Author

bamader commented Nov 14, 2024

Actually that reminds me that we need to also call the valueset insertion functions for the DIBBs hardcoded values / JSON dump file that you wrote at /src/app/assets/DIBBS_Custom_ValueSets.json in the create DB functions overall. This dump doesn't include those so our e2e's will totally fail. I'll update the code and the dump mount.

Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me. I wonder if we actually want to commit the vs_dump.sql to github or just have it locally? or do we need to upload it for tests to pass successfully?

@bamader
Copy link
Collaborator Author

bamader commented Nov 14, 2024

@robertandremitchell I believe we'll need to upload it for tests to pass once we take the migrations out. I'll have to modify the github workflow to take advantage of it. I think it's also probably good to commit it in case anyone else needs to pull things down and be able to iterate quickly, e.g. a designer who wants to test out a new feature's appearance.

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

Successfully merging this pull request may close these issues.

Add pgdump fileto run in dev mode
3 participants