数ヶ月前に問題が発生し、最終的に 2.9.0.beta1 に戻さざるを得ず、その時点ではそれ以上アップデートできませんでした。
様々な事情により、しばらくこのプロジェクトから離れていましたが、ようやく戻ってきました。根本的な問題は、PostgreSQLデータベースサーバーが十分にアップグレードされていなかったことで、これは現在解決され、PostgresQL 14.x で動作しており、Discourse もこのバージョンのデータベースで動作しています。
残念ながら、通常のウェブ管理者のアップグレードインターフェースから再度アップグレードしようとしたところ、fatal: HEAD does not point to a branch というメッセージが表示されました(完全なエラーはこちら:full error here):
fatal: HEAD does not point to a branch
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:203:in `run'
...
/var/discourse/launcher rebuild app を試してみましたが、うまくいかず、同じバージョンが起動しただけでした。しかし、以下の出力に気づきました:
$ ./launcher rebuild app
x86_64 arch detected.
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20220818-0047: Pulling from discourse/base
1efc276f4ff9: Pull complete
1b880e64942b: Pull complete
794f6dc9a2ff: Pull complete
Digest: sha256:7734701087766821ffb2ddcef423754798bd345c2ac0d550131c6e6905c268e8
Status: Downloaded newer image for discourse/base:2.0.20220818-0047
docker.io/discourse/base:2.0.20220818-0047
...
I, [2022-09-13T02:09:12.828649 #1] INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2022-09-13T02:09:12.829826 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2022-09-13T02:09:13.957219 #1] INFO -- :
I, [2022-09-13T02:09:13.958187 #1] INFO -- : > cd /var/www/discourse && git fetch --depth=1 origin tag v2.9.0.beta2 --no-tags
From https://github.com/discourse/discourse
* [new tag] v2.9.0.beta2 -> v2.9.0.beta2
I, [2022-09-13T02:09:18.214516 #1] INFO -- :
I, [2022-09-13T02:09:18.215535 #1] INFO -- : > cd /var/www/discourse && git checkout v2.9.0.beta2
Note: switching to 'v2.9.0.beta2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 88a85843 FIX: Cooking custom emojis should not use a secure URL (#15929)
I, [2022-09-13T02:09:19.557296 #1] INFO -- :
...
これらの変更をバックアップから復元して元に戻し、Discourse を HEAD の main に正しく再接続し、最新のベータ版で再構築を開始するにはどうすればよいか、ここでいくつかアドバイスを求めようと思いました。そして、これを最新の状態に戻した後、将来的には安定版リリースアップデートに固定したいと考えています。過去1年間悩まされていた問題を解決するためにベータ版を使用していましたが、これ以上のアドベンチャーは十分です。![]()