-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
docs(contributing-cheatsheet): add new cheatsheet docs #14554
base: main
Are you sure you want to change the base?
docs(contributing-cheatsheet): add new cheatsheet docs #14554
Conversation
Cheatsheet is an extenstion to CONTRIBUTING.md. This flavor focuses on the PostgreSQL dialect. It covers: - Sequelize tests - prequisite steps - running various tests and expectations - debugging expectations - using docker (basic commands) - creating docker networks - inspecting docker containers - connecting containers to docker networks - setting up pgadmin4 - running as a container - connecting it with database container - configuring pgadmin settings This is not intended as a replacement to CONTRIBUTING.md, which contains must-read information. This document is intended as a quick guide targeting those new to Docker and Sequelize development. There is great opportunity for stylistic and content improvements.
There was a slight deviation here from #14539 in that I changed the name, thinking that other dialects might want to have their own -- perhaps MySQL and phpMyAdmin? This wasn't intended to be a book or fully comprehensive, but I hope it helps others. |
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.
This is very thorough, really nice :)
A lot of it would work for the other dialects though, the only difference being the command name and which client needs to be installed
Do you think making this more generic (replacing pgAdmin4 Web with the desktop version so we can just link to their install page, and maybe mentioning other db clients like datagrip for the other dialects, and listing the possible commands for the different dialects) be still easy to understand?
--- | ||
|
||
## Helpful Notes and Explanations | ||
1. Most scripts in _package.json_ use `yarn`, which is not a package.json dependency and must installed globally or available by some other means; for instance, it does not need to be specifically installed. Read on: |
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 it would be simpler to link to yarn's install documentation which explains all of this, as otherwise we'll have to keep this in sync with theirs :)
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.
Your call. I didn't realize it until you told me about it :) Since yarn
is a dependency of the project (almost all npm scripts call it), but not included in the dev-dependencies, something needs to be stated as to why it wasn't included, or how to use it without installing it.
Linking to the documentation would be a good idea, but still need to be sure the links don't break in the future.
`docker exec -it <container name> psql -d sequelize_test -U sequelize_test` | Connect to a running database inside the container and run psql (psql is PostgreSQL-only) | ||
|
||
### PgAdmin4 | ||
1. Running pgadmin4 as a container (pgadmin is PostgreSQL-only) |
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.
Setting up the web version of pgAdmin4 is pretty cumbersome, is there any reason to use it instead of the desktop client?
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.
The CONTRIBUTING.md already included the docker code to start up pgadmin4; however, I couldn't get it working. That's why I included it here to mention how to get it working.
As for why I imagine that's going to be a preference. I know at my work, we are more limited on certain applications (or really the sockets) and think the web client would be a little less weight and bypass some of the more restrictive policies.
For my preference, I don't really use a GUI, just psql when necessary. I do think the configuration steps here may be of use to setting up other interfaces as it demonstrates how to work between the web and docker.
Note: I originally came here with a simple patch that I made to the files in |
This pull request has been marked as maybe-abandoned and has not seen any activity for 14 days. It will be closed if no further activity occurs within the next 30 days. If you would still like to work on this, please comment to let us know and the label will be removed. |
@WikiRik as this is a bit outdated now, should I put it in draft until it's ready to be reviewed? |
Cheatsheet is an extenstion to CONTRIBUTING.md. This flavor focuses on the PostgreSQL dialect.
It covers:
This is not intended as a replacement to CONTRIBUTING.md, which contains must-read information. This document is intended as a quick guide targeting those new to Docker and Sequelize development. There is great opportunity for stylistic and content improvements.