Discourse 재구축 실패

whenever i try to ./launcher rebuild app it gives an error.

root@amsaal:~# cd /var/discourse/
root@amsaal:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
fatal: No such ref: HEAD
fatal: No such ref: HEAD
Stopping old container

  • /usr/bin/docker stop -t 600 app
    app
    2.0.20241203-0251: Pulling from discourse/base
    Digest: sha256:d5d4e6d361d56745e37f2609db58a6970cc9b3fcd26d0b2dcba23d0cb581f067
    Status: Image is up to date for discourse/base:2.0.20241203-0251
    docker.io/discourse/base:2.0.20241203-0251
    /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
    /usr/local/bin/pups --stdin
    docker: invalid reference format: repository name (library/#<NoMethodError) must be lowercase.
    See ‘docker run --help’.
    cat: cids/app_bootstrap.cid: No such file or directory
    bootstrap failed with exit code 125
    ** 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.
    Container name cannot be empty
    root@amsaal:/var/discourse#

런처 저장소의 상태를 확인해 보셨나요?

git status

root@amsaal:/var/discourse# git status

아직 커밋이 없습니다

추적되지 않는 파일:
(커밋에 포함하려면 "git add …"을 사용하세요)
.github/
.gitignore
LICENSE
README.md
discourse-doctor
discourse-setup
image/
launcher
rebuild.log
samples/
scripts/
templates/
tests/

커밋할 것이 추가되지 않았지만 추적되지 않는 파일이 있습니다 (추적을 하려면 "git add"를 사용하세요)
root@amsaal:/var/discourse#

아래와 같은 내용을 확인하셨을 것입니다:

# git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

그래서 /var/discourse 디렉터리가 깨져서 더 이상 저장소와 연결되어 있지 않다고 생각합니다. .git 하위 폴더를 정리하거나, 잃어버리거나, 이름을 변경한 적이 있으신가요?

사실 저는 아무것도 건드리지 않았는데요? 어떻게 수정할 수 있을까요?

죄송합니다, 잘 모르겠습니다. .git 하위 디렉터리가 있습니까? 그 안에 무엇이 있나요?

제 경우, 설정 파일은 다음과 같습니다:

# cat .git/config 
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/discourse/discourse_docker.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main

하지만 이것은 참고용입니다. 설정 파일을 편집하는 것이 해결책이라고 생각하지 않습니다!

저도 같은 결과가 나옵니다.

root@amsaal:/var/discourse# cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote “origin”]
url = GitHub - discourse/discourse_docker: A Docker image for Discourse · GitHub
fetch = +refs/heads/:refs/remotes/origin/
[branch “main”]
remote = origin
merge = refs/heads/main

그리고 git status 결과입니다.

root@amsaal:/var/discourse# git status
On branch main
Your branch is based on ‘origin/main’, but the upstream is gone.
(use “git branch --unset-upstream” to fixup)

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: .github/workflows/build.yml
modified: LICENSE
modified: README.md
modified: templates/postgres.13.template.yml
modified: templates/postgres.15.template.yml
modified: templates/postgres.template.yml
modified: templates/web.ssl.template.yml
modified: templates/web.template.yml

Untracked files:
(use “git add …” to include in what will be committed)
rebuild.log

no changes added to commit (use “git add” and/or “git commit -a”)

무언가를 변경한 것 같습니다. 최신 git status 결과가 이전 보고와 매우 다르네요. 정말 신비롭군요!

그러면 디스코urses를 다시 설치하면 해결될 수 있나요? SSH를 통해 어떻게 해야 하는지 조언해 주실 수 있을까요?

완전한 재설치를 수행하려면 전체 백업(앱.yml 파일 포함)과 인스턴스에 설치된 새 운영 체제가 필요합니다.

설치 방법은 여기에 있습니다: INSTALL-cloud

새 인스턴스에서 설치를 시도하는 것이 가장 좋습니다. DNS에서 임시 서브도메인에 새 IP 주소를 추가해야 합니다. 또는, 다운타임이 괜찮다면 DNS를 새 IP 주소로 업데이트하면 됩니다.

무엇을 해야 하는지에 대한 최소한의 개념이 있어야 하며, 그렇지 않다면 도움이 필요합니다. 죄송하지만 제가 그 도움을 드릴 수는 없습니다.