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

Expose the DB port to the host machine so it's easy to use tools like TablePlus #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export POSTGRES_PASSWORD=password
#export POSTGRES_DB=hello
#export POSTGRES_HOST=postgres
#export POSTGRES_PORT=5432
#export POSTGRES_PORT_FORWARD=127.0.0.1:5499

# What's your full Redis connection URL? This will be used for caching, Sidekiq,
# and Action Cable. You can always split them up later.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ variables to fix this.

Visit <http://localhost:8000> in your favorite browser.

### Connect to the Database with tools like TablePlus/DBeaver:

By default we expose the internal port 5432 (default PostgreSQL port) to the
external world through the port 5499.
Connect to 127.0.0.1:5499, with the user `hello` and the password `password`.

#### Running the test suite:

```sh
Expand Down
2 changes: 2 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ services:
stop_grace_period: "3s"
volumes:
- "postgres:/var/lib/postgresql/data"
ports:
- "${POSTGRES_PORT_FORWARD:-127.0.0.1:5499}:${POSTGRES_PORT:-5432}"

redis:
deploy:
Expand Down
Loading