خطأ في تغيير كلمة مرور المستخدم عند بناء حاوية Postgres

بعد تثبيت postgres بنجاح في الحاوية، يحاول البرنامج النصي المشغل تغيير كلمة مرور المستخدم discourse. ومع ذلك، أحصل على هذا الخطأ

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.

يبدو أن postgres لا يعمل عندما يصل هذا الأمر إليه، لذلك يفشل في قطع الأنبوب. ملف postgres.yml الخاص بي يعتمد على ملف العينة data.yml على الرغم من ذلك، لذلك لست متأكدًا مما أفعله بشكل خاطئ. أي أفكار؟

هل يمكنك من فضلك

ثم شاركها هنا؟

إعجاب واحد (1)

مرحباً، لا يوجد شيء مميز في السجلات السابقة، لكن لاحظت في سجلات الحاوية هذه الرسالة

2024-01-26 12:30:54 I, [2024-01-26T17:30:54.465403 #1]  INFO -- : Reading from stdin
2024-01-26 12:30:54 /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/config.rb:22:in `block in initialize': undefined method `has_key?' for nil:NilClass (NoMethodError)
2024-01-26 12:30:54 
2024-01-26 12:30:54         @config[key] = {} unless @config.has_key?(key)
2024-01-26 12:30:54                                         ^^^^^^^^^
2024-01-26 12:30:54     from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/config.rb:21:in `each'
2024-01-26 12:30:54     from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/config.rb:21:in `initialize'
2024-01-26 12:30:54     from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/cli.rb:68:in `new'
2024-01-26 12:30:54     from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/cli.rb:68:in `run'
2024-01-26 12:30:54     from /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/bin/pups:9:in `<top (required)>'
2024-01-26 12:30:54     from /usr/local/bin/pups:25:in `load'
2024-01-26 12:30:54     from /usr/local/bin/pups:25:in `<main>'

هذا يعطل الحاوية حتى مع التعليق على تغيير كلمة مرور after_postgres، وهو المكان الذي تأتي منه مشكلة “broken pipe”.