UI를 통해 docker_manager를 업그레이드한 후(정상적으로 진행된 것처럼 보였음에도), Admin 대시보드는 포럼의 나머지 부분이 정상 작동하는 것처럼 보였음에도 불구하고 빈 페이지만 표시되었습니다.
이를 해결하기 위해 다음 명령을 실행했습니다:
./launcher rebuild app
그러나 해당 과정 중 다음과 같은 오류가 발생했습니다:
I, [2025-07-14T08:54:06.062789 #1] INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
set -o errexit
if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
git remote set-branches --add origin main
git remote set-branches origin tests-passed
git fetch --depth 1 origin tests-passed
else
git fetch --tags --prune-tags --prune --force origin
fi
'
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
… 그리고 error: packfile 메시지가 중단될 때까지 계속 출력됩니다.
모습을 보아 git 저장소가 손상된 것으로 보입니다. 그런데 어떤 git 저장소일까요? /var/www/discourse 폴더조차 존재하지 않으므로, 이는 컨테이너 볼륨 내부에 있는 것 같습니다.
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
error: packfile .git/objects/pack/pack-581fe47ace192793da04d01989a4d1a7f0e6103c.pack does not match index
etc..
드디어 해결했습니다!
손상된 _git_와 이전 docker 업그레이드의 결과가 복합적으로 작용한 것 같습니다. 모든 docker 컨테이너와 이미지를 정리(prune)하여 문제를 해결했습니다:
cd /opt/discourse
./launcher stop app
docker container prune
docker image prune -a
./launcher rebuild app
그 결과 다음과 같은 메시지가 출력되었습니다:
Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade.
Once you start the new server, consider running:
/usr/lib/postgresql/15/bin/vacuumdb --all --analyze-in-stages
Running this script will delete the old cluster's data files:
./delete_old_cluster.sh
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE
Old 13 database is stored at /shared/postgres_data_old
To complete the upgrade, rebuild again using:
./launcher rebuild app
-------------------------------------------------------------------------------------