Discourseの再構築が機能しない

埋め込みグラフィック付きの投稿を追加しようとした際にエラーメッセージが表示されました。ファイル保護の問題のようで、以下の実行を推奨されました。

./launcher rebuild app

それを実行したところ、以下のエラーが発生しました。

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 515 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
5c01a6b7b892f68e51e8f275b360af36d7b6f0ac8a3e22c837b0afaaef1705f4

このエラーは少々不可解です。5分ほどで表示されます。問題は、私のデータは /var/www/discourse ではなく /var/discourse にあることです。最後のバックアップは1ヶ月前で、この問題を修正して1ヶ月分のデータを失いたくありません。何かアイデアはありますか?再構築しないシステムでデータベースをバックアップし、その後バックアップ上でデータベースを復元することは可能でしょうか?

以前のエラーもあります:「プリフォーマットされたテキスト」

warning Skipping preferred cache folder "/home/discourse/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1000".
warning Cannot find a suitable global folder. Tried these: "/usr/local, /home/discourse/.yarn"
node:fs:1336
  handleErrorFromBinding(ctx);
  ^

Error: EACCES: permission denied, mkdir '/home/discourse/.config/configstore'
You don't have access to this file.

    at Object.mkdirSync (node:fs:1336:3)
    at AsyncFunction.module.exports.sync (/var/www/discourse/app/assets/javascripts/node_modules/make-dir/index.js:114:6)
    at Configstore.set all [as all] (/var/www/discourse/app/assets/javascripts/node_modules/configstore/index.js:59:12)
    at Configstore.set (/var/www/discourse/app/assets/javascripts/node_modules/configstore/index.js:91:12)
    at clientId (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/lib/cli/index.js:55:17)
    at module.exports (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/lib/cli/index.js:105:13)
    at Object.<anonymous> (/var/www/discourse/app/assets/javascripts/node_modules/ember-cli/bin/ember:34:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  errno: -13,

そもそも /home/discourse フォルダは存在しません。

それらのパスはコンテナの外側と内側にあります。

原因となっている可能性のあるプラグインはありますか? 標準以外のプラグインを削除して、それが修正されるかどうかを確認できますか?

ジェイ、解決したと思います。コンテナに接続でき、コンテナ内のパスがすべて rootchown されているようでした。それらをすべて discourse に戻したところ、元に戻りました。ただ、パーミッションが正しいかどうかはわかりません。この Discourse インスタンスは数ヶ月間変更なしで実行されていましたが、突然この問題が発生し、その理由を説明できません。何かアイデアはありますか?

chownを削除するコミットを見たような気がするので、バグの可能性があります。

しかし、標準以外のプラグインはありますか?

私のDiscourseは非常にプレーンバニラなので、いいえ。これは数日前の2.9.0.beta4にアップグレードした後に発生したと推測します。今まで問題に気づきませんでした。Beta3は正常に動作していました。コンテナの主要部分がrootにchownされた可能性があるように見えました。ほとんどはdiscourseが所有すべきではないでしょうか?

「いいね!」 1

Error trying to edit a post with an image in (NginX Proxy Manager?) - #22 by vmsman に続く