Skip to content
SHC Docs

Underneath the socket

Read this right after A Postgres socket. Every command here reads; none changes the cluster.

home01
$ shc integration plugs -s pgweb
STACK PLUG SOCKET CONNECTED TO
pgweb postgres postgres db.postgres
$ shc integration ls -s pgweb
CONSUMER STACK NAME CONSUMER PLUG PROVIDER STACK NAME PROVIDER SOCKET STATUS ID
pgweb postgres db postgres connected 0

pgweb has one plug, postgres, connected to db.postgres: deployment db, socket postgres. The integration is that connection, stored on the cluster.

The password in vars.yaml is a secret variable, so the install moved it into the vault and the deployment’s variables now point at it.

home01
$ shc vault ls -s pgweb
KEY SCOPE
var_postgres.password deployment

var_postgres.password is that password, scoped to the deployment. -s lists the deployment’s own keys; the cluster’s are listed by --scope global.

Before pgweb started, the socket ran a job in db’s container that made the database pgweb and its owner pgweb with that password. Log in as that role:

home01
$ shc exec -s db -S postgres-1 -- env PGPASSWORD=P@ssw0rd psql -h 127.0.0.1 -U pgweb -d pgweb -tAc 'select current_user'
pgweb

Next: A label and a location.