From 0d581702113279752119869125a624ce6c3cc88d Mon Sep 17 00:00:00 2001 From: Horoli Date: Mon, 2 Nov 2026 05:09:16 +0900 Subject: [PATCH] Restart Threads systemd service after deployment build --- build.sh | 3 ++- docs/threads-automation.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index b1a3481..b0a0069 100755 --- a/build.sh +++ b/build.sh @@ -12,5 +12,6 @@ fi sunrise_group=$(id -gn sunrise) npm run build install -d -o sunrise -g "$sunrise_group" -m 755 dist/threads-captures +systemctl restart sunrise-threads.service -echo 'Build complete; dist/threads-captures is writable by sunrise.' +echo 'Build complete; capture permissions restored and sunrise-threads.service restarted.' diff --git a/docs/threads-automation.md b/docs/threads-automation.md index 2bbee03..98a87c9 100644 --- a/docs/threads-automation.md +++ b/docs/threads-automation.md @@ -41,7 +41,8 @@ root에서 실행합니다. 캡처 저장 위치는 기존 dist/threads-captures cd /opt/sunrise git pull --ff-only npm ci -./build.sh +# 최초 서비스 등록 전에는 직접 빌드합니다. +npm run build install -d -o sunrise -g "$(id -gn sunrise)" -m 755 dist/threads-captures install -d -o sunrise -g "$(id -gn sunrise)" -m 700 data/threads chown -R sunrise:"$(id -gn sunrise)" data/threads dist/threads-captures @@ -88,7 +89,7 @@ sudo -iu sunrise sh -lc 'cd /opt/sunrise && npm run threads:post-now' 별도 브라우저 경로를 사용하면 테스트 터미널에도 동일한 환경변수를 적용하세요. post-now는 실행할 때마다 새 테스트 게시물을 만듭니다. preview 이미지는 확인용으로 보존합니다. -이후 배포는 git pull, 필요 시 npm ci, ./build.sh, 웹 서버 재시작, `systemctl restart sunrise-threads.service` 순서입니다. 설정/문구는 다시 복사하지 않습니다. root에서 ./build.sh를 실행하면 빌드 후 캡처 폴더 생성과 권한 설정까지 처리합니다. npm run build를 직접 실행했다면 아래 명령이 필요합니다. +이후 배포는 git pull, 필요 시 npm ci, ./build.sh, 웹 서버 재시작 순서입니다. ./build.sh가 빌드와 권한 설정에 성공한 뒤 sunrise-threads.service까지 재시작합니다. 설정/문구는 다시 복사하지 않습니다. root에서 ./build.sh를 실행하면 빌드 후 캡처 폴더 생성·권한 설정·서비스 재시작까지 처리합니다. 서비스가 아직 등록되지 않았다면 최초 등록 절차를 먼저 진행하세요. npm run build를 직접 실행했다면 아래 명령이 필요합니다. ```bash install -d -o sunrise -g "$(id -gn sunrise)" -m 755 /opt/sunrise/dist/threads-captures