File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555 sudo docker pull "$APP_IMAGE"
5656 cd /opt/ddd-be
5757 umask 077
58-
58+
59+ # Frontend bootstrap precondition (FE 팀 release 패턴: /opt/admin/frontend/current 가 symlink 여야 함)
60+ # 최초 1회 VM 부트스트랩이 누락되면 여기서 실패 — docs/admin-deploy.md §A 참고
61+ if [ ! -e /opt/admin/frontend/current ]; then
62+ echo "ERROR: /opt/admin/frontend/current 가 없습니다. VM 1회 부트스트랩이 필요합니다."
63+ echo " ssh dddstudy1@<VM> 후 docs/admin-deploy.md §A 의 5줄 실행"
64+ exit 1
65+ fi
66+
5967 # Create GCP Service Account Key file
6068 echo "$GCP_SERVICE_ACCOUNT_JSON" > gcp-key.json
6169
Original file line number Diff line number Diff line change 11admin.dddstudy.kr {
2- reverse_proxy app:3000
2+ # 백엔드: API + Swagger
3+ @backend {
4+ path /api/* /api-docs*
5+ }
6+ reverse_proxy @backend app:3000
7+
8+ # 프론트엔드: 정적 파일 + SPA fallback (history 모드 지원)
9+ root * /srv/frontend
10+ # SPA 라우팅, 새로고침 시 404 안나게하기위해
11+ try_files {path} /index.html
12+ # 정적 파일 서빙 핸들러를 활성화
13+ file_server
314}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ services:
4343 - " 443:443"
4444 volumes :
4545 - ./Caddyfile:/etc/caddy/Caddyfile
46+ - /opt/admin/frontend/current:/srv/frontend:ro
4647 - caddy_data:/data
4748 - caddy_config:/config
4849 depends_on :
You can’t perform that action at this time.
0 commit comments