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

Make psql shell #1627

Open
wants to merge 3 commits into
base: edge
Choose a base branch
from
Open

Make psql shell #1627

wants to merge 3 commits into from

Conversation

metasoarous
Copy link
Member

This is a just a little Makefile addition for firing up a psql shell by running make psql-shell.

Makefile Outdated
@@ -86,14 +86,18 @@ e2e-run-all: ## Run E2E tests: all
$(E2E_RUN) npm run e2e:all


psql-shell: ## Assuming a system is already running with `make start`, start up an interactive psql shell
docker-compose exec postgres psql --username postgres --dbname polis-dev
Copy link
Member Author

Choose a reason for hiding this comment

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

@ballPointPenguin Should this actually be --db-name polis-$TAG? Not sure how dev gets set, but assuming that's not right for production connections...

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it should pull DB_NAME from env

Copy link
Contributor

Choose a reason for hiding this comment

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

it's POSTGRES_DB in env.

@tevko
Copy link
Collaborator

tevko commented Nov 19, 2024

@ballPointPenguin Seeing this is approved, is this something we want to merge?

Copy link
Contributor

@ballPointPenguin ballPointPenguin left a comment

Choose a reason for hiding this comment

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

update DB name according to env

@ballPointPenguin
Copy link
Contributor

I updated this to use the provided .env to determine how to connect to psql, among other small fixes. I tested this in dev (default) and TEST modes, and it works nicely. Ready to merge.

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.

4 participants