-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --exposed-dsn option for postgres:info
- Loading branch information
1 parent
d8c2656
commit f617bdb
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,7 @@ dokku postgres:info lolipop | |
# you can also retrieve a specific piece of service info via flags | ||
dokku postgres:info lolipop --data-dir | ||
dokku postgres:info lolipop --dsn | ||
dokku postgres:info lolipop --exposed-dsn | ||
dokku postgres:info lolipop --exposed-ports | ||
dokku postgres:info lolipop --id | ||
dokku postgres:info lolipop --internal-ip | ||
|
@@ -265,6 +266,27 @@ The `import` command should be used with any non-plain-text files exported by `p | |
dokku postgres:connect db < ./dump.sql | ||
``` | ||
|
||
## Exposed DSN | ||
|
||
```shell | ||
# expose the database (you must open the exposed port on your firewall if you have one) | ||
dokku postgres:expose lolipop | ||
|
||
# exposed dsn available on service info | ||
dokku postgres:info lolipop | ||
=====> Container Information | ||
... | ||
Exposed dsn: postgres://postgres:[email protected]:28804/lolipop | ||
Exposed ports: 5432->28804 | ||
... | ||
``` | ||
|
||
So now you connect to your database with [`pgcli`](https://www.pgcli.com/) or with your favorite app. | ||
|
||
```shell | ||
pgcli $(ssh [email protected] postgres:info lolipop --exposed-dsn) | ||
``` | ||
|
||
## Security | ||
|
||
The connection to the database is done over SSL. A self-signed certificate is | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters