ci: secret-free webhook 자동 배포로 전환
Deploy momo-erp via webhook / deploy (push) Failing after 0s

- /api/deploy/webhook: X-Deploy-Token 검증 후 백그라운드로 deploy.sh spawn
- scripts/deploy.sh: git pull + docker compose up --build + migrate
- docker-compose.prod.yml: docker.sock + 소스 디렉토리 마운트
- deploy.yml: webhook 호출 + 헬스체크 폴링 (시크릿 의존성 제거)
- 미들웨어 공개 경로에 /api/deploy/webhook 추가

서버 1회 셋업 (docker-compose.prod.yml 갱신본을 한 번 배포하기만 하면
이후 push 시 자동 재배포 영구 동작)
This commit is contained in:
chpark
2026-04-25 21:30:48 +09:00
parent 0b6def8cda
commit b97e7b63a4
7 changed files with 321 additions and 51 deletions
+6
View File
@@ -13,6 +13,12 @@ services:
- .env.production
volumes:
- ./data_storage:/data_storage
# 자가 배포: webhook 이 호스트의 deploy.sh 를 실행하기 위함
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts/deploy.sh:/deploy/deploy.sh:ro
# source 디렉토리를 컨테이너 안에서 git pull 하기 위해 호스트의 소스를 마운트
# (호스트 ~/momo-erp/source 를 /deploy/source 로)
- $PWD:/deploy/source
networks:
- traefik-net
labels: