Discourse Rebuild이 작동하지 않습니다

포스트에 그래픽을 임베드하려고 할 때 오류 메시지가 발생했습니다. 파일 보호 문제인 것으로 보였고, 다음을 실행하라는 제안을 받았습니다:

./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에 있다는 것입니다. 마지막 백업은 한 달 전이었고, 지난 한 달 동안의 데이터를 잃고 싶지 않아 이 문제를 해결하고 싶습니다. 어떤 아이디어가 있을까요? 리빌드하지 않는 시스템에서 데이터베이스를 백업한 후, 백업 시스템에 데이터베이스를 somehow 복구하는 것이 가능한가요?

또한 이전에도 다음과 같은 오류가 있었습니다: Preformatted text

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 폴더조차 존재하지 않습니다.

해당 경로들은 컨테이너 외부와 내부에 위치해 있습니다.

이 문제를 일으킬 수 있는 플러그인이 있나요? 표준이 아닌 플러그인을 삭제하고, 그렇게 하면 문제가 해결되는지 설정해 볼 수 있을까요?

제이, 원인을 파악한 것 같습니다. 컨테이너에 연결해서 확인해 보니, 컨테이너 내부의 경로 소유자가 어딘가에서 root로 변경되어 있었습니다. 모두 discourse로 다시 변경했고, 서비스가 정상적으로 복구되었습니다. 문제는 보호 설정이 올바른지 확신이 서지 않는다는 점입니다. 이 Discourse 인스턴스는 몇 달간 아무런 변경 없이 정상적으로 운영되고 있었는데, 갑자기 이런 일이 발생했고 그 이유를 설명할 수 없습니다. 어떤 생각이 있으신가요?

chown을 제거하는 커밋을 본 것 같은데, 버그일 수도 있겠네요.

혹시 표준이 아닌 플러그인을 사용 중이신가요?

제 Discourse는 아주 평범한(기본) 설정이라, 아니요. 제 추측으로는 며칠 전에 2.9.0.beta4로 업그레이드한 후에 이런 문제가 발생한 것 같습니다. 지금까지는 문제를 인지하지 못했습니다. Beta3에서는 정상적으로 작동했습니다. 컨테이너의 상당 부분이 root로 chown된 것처럼 보였습니다. 대부분의 파일은 discourse가 소유해야 하는 것 아닌가요?