Skip to content

postgresql

Upgrading postgres on docker swarm

Upgrading Postgresql deployed on Docker Swarm I have deployed an app in staging on Docker Swarm, and it uses a postgresql database, using the Docker image with version 15.4. With Postgresql 16.0 published recently, here’s how I upgraded it. The setup I’m using a one-node Docker Swarm, but I suspect this should apply to multi-nodes as well. The postgresql container of the stack is pinned to a specific node, and is mounting the host directory /data/myowndb/db at /var/lib/postgresql/data for data persistence.