How are PostgreSQL upgrades handled in the container?

When self-hosting Discourse in the official docker container, how can I expect updates/upgrades of the underlying database – or Ruby on Rails, for that matter – to be handled?

I’m new to PostgreSQL, but I understand that some upgrades of it have been complicated in the past.