mattermost command line broken in Docker since the 5.11.1 -> 5.12.0 transition

Description

Original report:
https://github.com/mattermost/mattermost-server/issues/12327
https://forum.mattermost.org/t/cannot-connect-to-the-postgresql-database-using-mattermost-cli/7809

Summary
Running using docker-compose and trying to run the mattermost command line results in "Failed to ping DB retrying in 10 seconds".

Steps to reproduce

mkdir /tmp/mattermost
cd /tmp/mattermost
git clone https://github.com/mattermost/mattermost-docker.git
cd /tmp/mattermost/mattermost-docker
git checkout tags/5.12.0
vi /tmp/mattermost/mattermost-docker/docker-compose.yml

  • edition=team

  • PUID=1000

  • PGID=1000
    docker-compose build --force-rm --pull
    docker-compose up -d
    docker exec mattermostdocker_app_1 sh -c '/mattermost/bin/mattermost --help'
    docker exec mattermostdocker_app_1 sh -c '/mattermost/bin/mattermost team create --name test --display_name "Test"'
    docker exec mattermostdocker_app_1 sh -c '/mattermost/bin/mattermost team list'

Expected behavior
The team test will be listed.

Observed behavior
See an error "Failed to ping DB retrying in 10 seconds".

Possible fixes
git checkout tags/5.11.1

QA Test Steps

Area: Docker, cloud

Instructions are in the description. Not sure if you (Dylan) are the right QA person for this.
Thanks!

Status

Mana

None

Assignee

Christopher Poile

QA Assignee

Dylan Haussermann

Reporter

Amy Blais

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

Labels

QA Testing Areas

Other (write in QA test steps)

Components

None
Configure