Update: To conform with upstream, we’ve removed our default root
role/user so that the postgres
role/user is automatically created. See this . The TL;DR is if you were using root
as your user, either create it via config or use postgres
as the user.
Hey everyone,
Here’s what’s going on and what caused it.
The Problem
Most of the CircleCI Docker Convenience Images are small CI tweaks we apply to the upstream Docker Library images. So the circleci/postgres
image is based on the postgres
image.
4 days ago the upstream maintainers made a small tweak to the image so that the postgres
role/user is only created when the POSTGRES_USER
is not set. So of course, we set it to root
. This has caused circleci/postgres
images built within the last few days to no longer have the postgres
role.
The Solution
There’s 3 quick solutions:
- There’s already a
root
PostgreSQL role/user in the image. You can change your DB creds to use that instead ofpostgres
. - Set the
POSTGRES_USER
environment variable in your CircleCI config topostgres
and you’ll get the role back in the image as it was before. This would be done something like this:
- image: circleci/postgres:9.6-alpine
environment:
POSTGRES_USER: postgres
- Use the upstream image directly (e.g.
postgres:9.6
). Keep in mind certain utilities that CircleCI features need might not be installed.