PostgreSQL 16 has been released, and it includes some changes regarding the bootstrap user. Our CI using the latest tag, so it's using postgres:16 currently. It is failing with the following error. ERROR: permission denied to alter role DETAIL: The bootstrap user must have the SUPERUSER attribute. We are using "postgres 15.4" at development and production. I pin CI version to 15.4. When we want to upgrade postgres 16, we may change all of them.
41 lines
850 B
YAML
41 lines
850 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15.4
|
|
container_name: ubicloud-postgres
|
|
env_file: .env
|
|
ports:
|
|
- 5432:5432
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
- ./init_db.sh:/docker-entrypoint-initdb.d/init_db.sh
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
db-migrator:
|
|
image: ubicloud/ubicloud:latest
|
|
container_name: ubicloud-db-migrator
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
env_file: .env
|
|
command: rake dev_up
|
|
|
|
app:
|
|
image: ubicloud/ubicloud:latest
|
|
container_name: ubicloud-app
|
|
depends_on:
|
|
db-migrator:
|
|
condition: service_completed_successfully
|
|
env_file: .env
|
|
ports:
|
|
- 3000:3000
|
|
command: foreman start
|
|
|
|
volumes:
|
|
postgres:
|