So we can do this in a few steps:
- Pull down your
You can do this by running:
flyctl config save --app <app-name>
- Allocate an IP address to your instance, if you haven’t already.
# See current list of ips.
flyctl ips list
# Allocate an IPv6 address
flyctl ips allocate-v6
- Add the following to your
internal_port = 5432
protocol = "tcp"
# For secure connections
handlers = ["tls"]
port = 443
# For insecure connections.
handlers = 
port = 10000
- Deploy your configuration changes.
# Note: Use flyio/postgres:12 if running PG 12.
flyctl deploy . --app <app-name> --image flyio/postgres:13
Using the insecure connection as an example, you should now be able to connect by running:
Note: It may take a few minutes before the allocated ip address is recognized.
Let me know if you have any other questions!