-
Notifications
You must be signed in to change notification settings - Fork 189
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
Fixes #3692 by adding database info to environment-setup
file
#3722
Conversation
@manekenpix I filed the issue and created the PR. Please assign someone else to review this PR. |
@RC-Lee, Sorry, my bad. :) |
|
||
The first time you start the database, it doesn't have any data. Therefore, we need database seeding as a way to populate the database with an initial set of data to make some parts of our application work properly. | ||
|
||
To seed the database with initial data use the command `pnpm seed`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you need to run is pnpm db:init
, which runs db:migrate
and db:seed
. It'd be a good idea to explain what those 2 commands do, and also it's very likely that, after running pnpm db:init
the parse container needs to be restarted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on it.
16986fb
to
81c5cb9
Compare
81c5cb9
to
16986fb
Compare
I do my setup a bit out of the status quo, but I'm wondering if you've tested yourself? (Including deleting the redis cache ( Just from what I've experienced, the db scripts will not be able to run correctly if the db containers aren't running. |
If you do the setup using the environment-setup as a guide, you would most likely run into database issues. I pointed out this problem in the Telescope channel, and @humphd suggested filing an issue for it. |
16986fb
to
6469625
Compare
|
||
Running this command will populate the database with an initial set of data to make some parts of our application work properly. | ||
|
||
Finally, restart the `parser` container by running `pnpm:services start parser`/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the forward slash at the end of this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a typo, sorry.
@@ -240,6 +240,24 @@ Docker builds Telescope's dependencies at launch and keeps them on disk. In some | |||
|
|||
::: | |||
|
|||
### Seeding PostgresSQL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this section should be part of the Start telescope
section since the pnpm db:init
script (not a command), won't work unless telescope, and specifically the db containers, are already running. Also, I think the env var in this env file needs to be present in the environment.
Also, make sure your instructions work before pushing your changes to this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, make sure your instructions work before pushing your changes to this PR.
Definitely.
How is progress on this? I just ran into this issue and this would be a nice to have! |
I am working on this. |
These steps did not seem to work for the db... |
Yes, because it's WIP. In the meantime, users can setup their environment using steps not introduced through this PR. |
4840906
to
cbb0eff
Compare
cbb0eff
to
4840906
Compare
Update docs based on feedback
7289241
to
4c9d96d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks @SerpentBytes !
@manekenpix Thank you for all your help. |
… file (Seneca-CDOT#3722) * Fixes Seneca-CDOT#3692 by adding database info to docs
Issue This PR Addresses
Fix #3692 by including information on properly seeding the database in the
environment-setup
file.Type of Change
Description
This PR adds information on how to seed
PostgresSQL
locally for testing purposes properly.Steps to test the PR
environment-setup
file.Checklist