First, use alpine images if possible.
Second, use ENV variables for prepare database configuration. More info.
Third, use /docker-entrypoint-initdb.d directory for extend image. More info.
Example stack with devlopment environment.
You did everything right, it is the correct InSpec test and use with Docker!
You encountered a bug in InSpec that is related to InSpec's netstat output parsing combination with Alpine's netstat output.
See InSpec's output for postgres container instead of postgres:alpine:
$ inspec exec docker_test.rb -t docker://1c8162517c22 ...
What is the default user of postgresql?
How does hardcoding the postgres user improve security?
It's not using the root user.
You can use any account you like, but consistency is a Wonderful Thing, especially when you have lots [and lots] of Postgres clusters to manage.
What special rights does the postgres user have?
I searched for the healthcheck/postgres:alpine and I found the following repository with the Dockerfile:
Assuming this is the correct repo for your docker image, the dockerfile specifies:
COPY docker-healthcheck /usr/local/bin/
HEALTHCHECK CMD ["docker-...
You can not change the port that Azure Database for PostgreSQL server uses. Connections to your Azure Database for PostgreSQL server communicate over port 5432. When you try to connect from within a corporate network, outbound traffic over port 5432 might not be allowed by your network's firewall. If so, you can't connect to your server unless your IT ...
I ended up using stolon for its automatic leader election and fail over handling.
Crunchy Data offers small building blocks so there is a lot of work to do to put them all together while stolon has a ready helm chart.
But I didn't try patroni since stolon worked just fine.
First chef runs as often as you configure it to do.
Second Chef is a configuration management system and not a crontab or an orchestration system.
Use chef to configure cron (that can not be not an option, try to find out why this is not considered) for your backup using consul-template to retrieve the secret from vault. Don't use Chef to run the backups ...