26 lines
No EOL
827 B
YAML
26 lines
No EOL
827 B
YAML
# PHP / 일반 웹 배포 (DB 보존 모드)
|
|
image: alpine:latest
|
|
|
|
stages:
|
|
- deploy
|
|
|
|
deploy_with_protection:
|
|
stage: deploy
|
|
script:
|
|
- apk add --no-cache rsync
|
|
- mkdir -p /deploy/5119/jasan
|
|
|
|
# [삭제 방지] rsync를 이용해 제외된 항목은 건드리지 않음
|
|
# (업로드된 파일이나 DB 등이 삭제되지 않도록 보호)
|
|
- rsync -rltv --delete --exclude='dda/' --exclude='.git/' ./ /deploy/5119/jasan/
|
|
|
|
# 권한 설정 (http 읽기/쓰기 문제 해결)
|
|
- chown -R 1023:1023 /deploy/5119/jasan || true
|
|
- chmod -R 755 /deploy/5119/jasan
|
|
|
|
# 보존된 데이터 폴더 생성 및 쓰기 권한 부여 (자동 생성)
|
|
# dda/ 폴더 생성 및 권한 부여
|
|
- mkdir -p /deploy/5119/jasan/dda/
|
|
- chmod -R 777 /deploy/5119/jasan/dda/
|
|
only:
|
|
- main |