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

Add instructions for local postgres #2442

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

sjwmoveon
Copy link
Collaborator

Description

Add additional documentation on how to set up Postgres if using a local installation and not Docker. I tried setting up locally with a preexisting Postgres installation and found I needed to make the listed changes.

Checklist:

  • [N/A] I have manually tested my changes on desktop and mobile
  • [N/A] The test suite passes locally with my changes
  • [N/A] If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • I have made any necessary changes to the documentation
  • [N/A] I have added tests that prove my fix is effective or that my feature works
  • [N/A] My PR is labeled [WIP] if it is in progress

Add additional documentation on how to set up Postgres if using a local installation and not Docker.
* Grant permissions to the new Spoke user:
* `psql -d spokedev -c "GRANT ALL PRIVILEGES ON DATABASE spokedev TO spoke;"`
* `psql -d spokedev -c "GRANT ALL PRIVILEGES ON schema public TO spoke;"`
* Also run the commands from `./dev-tools/create-test-database`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This tool won't work for local pg because its set up for docker.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, I'm not saying to run the script directly but to manually run the commands to create a test database instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh I see. I would instead have you place those instructions directly in the document (minus the docker stuff). I can see new devs getting confused like I did.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated the explanation, hopefully this is more clear!

We don't actually want to run the script, which is built for Docker environments - we just want to run the SQL commands from that script.
@mau11 mau11 changed the base branch from main to stage-main-14.1.2 October 18, 2024 18:57
Copy link
Collaborator

@engelhartrueben engelhartrueben left a comment

Choose a reason for hiding this comment

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

🎉

@mau11 mau11 merged commit 0c37c46 into StateVoicesNational:stage-main-14.1.2 Oct 18, 2024
8 checks passed
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.

3 participants