Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

flynn/postgres-external-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flynn External PostgreSQL Provider

This app can be configured as a Flynn provider that will provision databases on a shared external PostgreSQL cluster.

Setup

First setup the target external database by creating a system user for the provider to connect to.

Executing the following will create a user flynn with the appropriate permissions

CREATE USER flynn WITH SUPERUSER CREATEDB CREATEROLE PASSWORD '<database admin pass>'

Clone the repository locally and execute the following:

$ flynn create pg-external
$ flynn env set PGHOST="<external database hostname or IP>" PGUSER="flynn" PGPASSWORD="<database admin pass>" SERVICE_NAME="pg-external"
$ flynn route remove $(flynn route | tail -1 | tr -s ' ' | cut -d" " -f3)
$ git push flynn master
$ flynn provider add pg-external http://pg-external-web.discoverd:8080/databases

Usage

Once you have completed the setup you can add databases to your applications with:

$ flynn resource add pg-external

Normal Flynn pg commands will work with this appliance:

$ flynn pg psql

Caveats

The CLI commands will use the built in PostgreSQL appliance container to launch commands. As such the external database provider needs to use a compatible version of PostgreSQL.

About

Flynn PostgreSQL External Provider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages