Docker로 Discourse 설치 실패

app.yml 파일을 작성하고, 다음 명령어를 사용하여 이미지를 다시 빌드했습니다.

sudo ./launcher rebuild app

그러나 다음과 같은 문제가 발생했는데, 어떻게 해결해야 할지 전혀 모르겠습니다…

I, [2021-07-07T01:28:34.484614 #1]  INFO -- : 
I, [2021-07-07T01:28:34.484941 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
** PLUGIN FAILURE **

You are unable to build Discourse due to this error during plugin
initialization:

uninitialized constant Onebox

/var/www/discourse/plugins/google_docs_onebox/plugin.rb:6:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:629:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:629:in `activate!'
lib/discourse.rb:240:in `block in activate_plugins!'
lib/discourse.rb:237:in `each'
lib/discourse.rb:237:in `activate_plugins!'
/var/www/discourse/config/application.rb:313:in `block in <class:Application>'
/var/www/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/var/www/discourse/config/application.rb:312:in `<class:Application>'
/var/www/discourse/config/application.rb:73:in `<module:Discourse>'
/var/www/discourse/config/application.rb:72:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/rake_module.rb:29:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/rake_module.rb:29:in `load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:710:in `raw_load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:104:in `block in load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:103:in `load_rakefile'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:82:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/lib/rake/application.rb:80:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.4/exe/rake:27:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake:23:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/exe/bundle:49:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.19/exe/bundle:37:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
I, [2021-07-07T01:28:35.629849 #1]  INFO -- : 
I, [2021-07-07T01:28:35.674810 #1]  INFO -- : Terminating async processes
I, [2021-07-07T01:28:35.674950 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 70
I, [2021-07-07T01:28:35.675020 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 187
2021-07-07 01:28:35.675 UTC [70] LOG:  received fast shutdown request
187:signal-handler (1625621315) Received SIGTERM scheduling shutdown...
187:M 07 Jul 2021 01:28:35.675 # User requested shutdown...
187:M 07 Jul 2021 01:28:35.675 * Saving the final RDB snapshot before exiting.
2021-07-07 01:28:35.742 UTC [70] LOG:  aborting any active transactions
187:M 07 Jul 2021 01:28:35.742 * DB saved on disk
187:M 07 Jul 2021 01:28:35.742 # Redis is now ready to exit, bye bye...
2021-07-07 01:28:35.745 UTC [70] LOG:  background worker "logical replication launcher" (PID 79) exited with exit code 1
2021-07-07 01:28:35.747 UTC [74] LOG:  shutting down
2021-07-07 01:28:36.300 UTC [70] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3841 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
1eaf7abdf201a825d63cd5c85f3e2217f718c135926b71519cda2050340da3d5
** 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.

전체 로그는 다음과 같습니다:
Note.txt (75.4 KB)

문제는 app.yml 파일에 플러그인을 추가할 수 없는 이유를 모르겠다는 것입니다.

제 app.yml에서 플러그인 영역은 다음과 같습니다:

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-checklist.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-whos-online.git
          - sudo -E -u discourse git clone https://github.com/gdpelican/babble.git
          - sudo -E -u discourse git clone https://github.com/kasperpeulen/discourse-mathjax.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-tooltips.git
          - sudo -E -u discourse git clone https://github.com/paviliondev/discourse-topic-previews.git
          - sudo -E -u discourse git clone https://github.com/naveed-ahmad/google_docs_onebox.git

권한 거부(permission denied) 문제가 발생하는 것 같습니다…
이를 해결할 방법이 있을까요?
감사합니다!!

google_docs_onebox이 아마도 손상되었을 텐데, app.yml 파일에서 해당 줄을 그냥 삭제하면 되나요?

해당 gem의 소스는 6년 동안 업데이트되지 않았습니다. 문서에는 다음과 같이 명시되어 있습니다:

이 플러그인은 공식 Onebox gem에 통합되었습니다. 따라서 최신 버전을 사용 중이라면 이 플러그인을 설치할 필요가 없습니다.

따라서 해당 항목을 제거해야 합니다.

알겠습니다!!
@Benjamin_D 님, @Andrew Schleifer 님 감사합니다!!

실제로 제가 테스트해본 바로는, 아래 부분을 제거한 후에는 에러 없이 잘 작동했지만, 전체 플러그인이 설치되지 않았습니다.

- sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-checklist.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-whos-online.git
          - sudo -E -u discourse git clone https://github.com/gdpelican/babble.git
          - sudo -E -u discourse git clone https://github.com/kasperpeulen/discourse-mathjax.git
          - sudo -E -u discourse git clone https://github.com/discourse/discourse-tooltips.git
          - sudo -E -u discourse git clone https://github.com/paviliondev/discourse-topic-previews.git
          - sudo -E -u discourse

도움 주셔서 감사합니다!!

감사합니다,
Chieh