You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Valentin Lab 046c28f4c4 new: [postgres-stub,postgres,*/postgres_database] new charm 7 days ago
..
hooks new: [postgres-stub,postgres,*/postgres_database] new charm 5 days ago
lib new: [postgres-stub,postgres,*/postgres_database] new charm 5 days ago
README.org new: [postgres-stub,postgres,*/postgres_database] new charm 5 days ago
metadata.yml new: [postgres-stub,postgres,*/postgres_database] new charm 5 days ago

README.org

Description

postgres-stub allows you to declare an external postgres so that your local services can connect to it. It assumes you have the host, port of the external postgres access, and a login, password, and a database (already created) to connect to.

For now, this stub can't manage an admin access to create database, and more. This would be an easy addition thou.

This can be useful for instance if you have an external provider giving you access to their postgres (use SSL then!), or in your private cloud, or on the same host but not managed by docker, either directly on the host or by other virtual services (LXC, VMWare…).

Usage

You can declare a stub service by specifying at least the host of your external postgres database.

my-postgres-stub:
  charm: postgres-stub
  options:
    host: my-host.mydomain.fr:20432

If you don't specify a port, then it'll be defaulted to 5432

Any service that want to connect to this database could then:

myservice:
  # ...
  relations:
    postgres-database:
      postgres-stub:
        my-postgres-stub:
          dbname: my-db-name
          user: my-username
          password: my-p4s5w0rd