cronjob를 통한 자동 업데이트 - 안전한가요?

I’m thinking of auto-updating Discourse via cronjob. For example every two weeks in the night a cronjob with the following:

cd /var/discourse
./launcher rebuild app

Do you think this is safe to do? Or should I do this manually?

It’s possible that something will go wrong and you’ll leave your site broken. I recommend that you list attention when you do it.

Yeah. I was thinking of sending all the build output via mail, so I can check in the morning.

Personally, I do the exact same thing with my sites, but I use the two-container install in case the bootstrap fails.

Only if the bootstrap completes successfully does the old container stop and the new one start.

So far I have had no problems

Jay가 말했듯이, 드문 경우이지만 업데이트가 문제를 일으킬 수 있습니다(디스코urs 자체든 플러그인/컴포넌트든 상관없이). 몇 년 동안 몇 번 정도 그런 일이 발생한 것을 본 적이 있습니다. 매우 드문 일이지만, 수정은 빠르게 이루어집니다. 이 때문에 저는 인스턴스를 재구성하기 전에 업데이트에 대한 정보를 확인하고(Contribute > Bug 카테고리 :eyes: 확인) 새로운 버전이 공식적으로 출시된 후 며칠 정도 기다리는 편입니다.

그리고 때로는 ./launcher cleanup도 실행합니다.

따라서 저는 정보를 수집한 후, 제가 원하는 시점에 업데이트를 선호합니다. 잠재적인 피해에 대한 대응책이 있으므로 더 안전합니다.

Anything new about this in 2026?

I’d like to implement security updates asap (even at the risk of breaking a production site because of unattended update). Discourse doesn’t actually distinguish between security updates and other.. so I don’t mind just updating everything, every day. Is corn job still the way to go?

I personally wouldn’t do it. On the one hand, I don’t even need to update monthly for security fixes - which is to say, I read the release notes and make a decision. On the other hand, if you update daily, you’ll find more of the rare times when the thing will fail. You’ll have more downtime, for sure.

If you don’t mind that the cron job will sometimes kill the forum, until someone skilled comes to fix it, then sure, run the cron job. But bear in mind the skilled person might need to engage the developers here and wait some more hours until the thing is diagnosed and fixed.

지난 4년간 디스커스 업데이트로 인해 포럼이 한 번도 깨진 적이 없어서 크게 걱정하지 않습니다. 드물게 문제가 발생하더라도 감당할 수 있습니다.

제 걱정은 주로 보안에 관한 것입니다. 최근 사건들(예: 일주일 전의 Axios npm 패키지 라이브러리 해킹 등)을 보면, 새 버전이 출시된 후 7일 정도 기다렸다가 라이브러리를 업데이트하는 것이 좋을 수 있습니다.

보안 관련 항목은 즉시 업데이트하고 나머지는 7일 지연으로 처리할 수 있다면 이상적이겠지만, 디스커스에서 이를 지원하는지는 의문입니다.

업데이트 문제 때문에 포럼이 충돌하는 것만이 문제가 아닙니다. 대신 새로운 버그, 깨진 기능, 플러그인 또는 구성 요소의 호환성 문제 등이 조용히 도입될 수도 있습니다. 물론 이런 일은 드뭅니다.

포럼의 업데이트 주기를 크게 늘리는 것이 충돌이나 버그를 겪을 위험을 높일 수 있지만, 상황을 지켜본 후 문제가 너무 많으면 되돌릴 수 있습니다.

제가 말하려는 것은, 일부 사람들에게는 최고의 아이디어가 아닐 수 있지만, 실제로는 그렇게 위험하지도 않다는 것입니다.