Restart Threads systemd service after deployment build

This commit is contained in:
2026-11-02 05:09:16 +09:00
parent 924f2e0506
commit 0d58170211
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -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