diff --git a/.env.example b/.env.example index 279eb9d..42759b3 100644 --- a/.env.example +++ b/.env.example @@ -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. diff --git a/README.md b/README.md index d3e820b..984fe26 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,12 @@ variables to fix this. Visit 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 diff --git a/compose.yaml b/compose.yaml index 7392fb9..9b8b865 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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: