The user ewd910 is encountering an error while building a Postgres container for Discourse, where the launcher script fails to alter the user password due to a broken pipe, likely because Postgres isn’t running. The error occurs during the su - postgres -c 'psql discourse' command, resulting in exit code 141. Firepup650 advises checking earlier logs, but ewd910 reports no notable errors except a NoMethodError related to has_key? on a nil object in the pups gem, which causes the container to crash even when password alteration is disabled.
After postgres is successfully installed in the container, the launcher script tries to change the password of the discourse user. However I get this error
Pups::ExecError: su - postgres -c 'psql discourse' failed with return #<Process::Status: pid 100 exit 141>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"stdin"=>"alter user discourse with password 'redacted';\n", "cmd"=>"su - postgres -c 'psql discourse'", "raise_on_fail"=>true}
bootstrap failed with exit code 141
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
Seems like postgres isn’t running when this command is reached so it fails in a broken pipe. My postgres.yml is based off the data.yml sample file though, so I’m not sure what I’m doing wrong. Any ideas?