외부 개발, 내부 개발 분리

This commit is contained in:
2026-08-08 13:07:41 +00:00
parent 4cdf585bc2
commit 96fdbdf218
2 changed files with 36 additions and 1 deletions
+9 -1
View File
@@ -1,4 +1,5 @@
# Public endpoint. Caddy obtains TLS certificates for DOMAIN automatically. # Public endpoint assigned to this stack. Caddy obtains TLS certificates for
# DOMAIN automatically when it terminates TLS itself.
DOMAIN=game.example.com DOMAIN=game.example.com
PUBLIC_SCHEME=https PUBLIC_SCHEME=https
ACME_EMAIL=admin@example.com ACME_EMAIL=admin@example.com
@@ -7,6 +8,13 @@ CADDY_SITE_ADDRESS=
HTTP_PORT=80 HTTP_PORT=80
HTTPS_PORT=443 HTTPS_PORT=443
# Current local E2E ingress example (do not use dev-sam2026.hided.net here):
# DOMAIN=dev-sam-e2e.hided.net
# PUBLIC_SCHEME=https
# CADDY_SITE_ADDRESS=http://dev-sam-e2e.hided.net
# HTTP_PORT=14999
# HTTPS_PORT=15099
# Runtime hard limits. Keep swap equal to memory so the container cannot consume host swap. # Runtime hard limits. Keep swap equal to memory so the container cannot consume host swap.
RUNTIME_MEMORY_LIMIT=4g RUNTIME_MEMORY_LIMIT=4g
RUNTIME_MEMORY_SWAP_LIMIT=4g RUNTIME_MEMORY_SWAP_LIMIT=4g
+27
View File
@@ -5,6 +5,33 @@ Caddy와 Git/PM2 release-controller를 기동하기 위한 공개 배포 골격
profile은 관리자 화면에서 각각 다른 branch 또는 commit을 선택해 DB 유지 배포, profile은 관리자 화면에서 각각 다른 branch 또는 commit을 선택해 DB 유지 배포,
DB 초기화 배포와 rollback을 수행합니다. DB 초기화 배포와 rollback을 수행합니다.
## 현재 도메인 배치
`dev-sam2026.hided.net`은 실제 외부 Core2026 서비스입니다. 이 저장소로 띄운
로컬 E2E Docker stack은 `dev-sam-e2e.hided.net`을 사용하며, 외부 Caddy가 TLS를
종료한 뒤 `172.30.1.54:14999`의 HTTP listener로 호스트 전체를 전달합니다.
Docker Caddy가 `/gateway/`, `/che/`, `/hwe/``/image/*`를 내부 서비스와
자산으로 분기합니다.
E2E `.env`의 비밀이 아닌 ingress 값은 다음과 같습니다.
```dotenv
DOMAIN=dev-sam-e2e.hided.net
PUBLIC_SCHEME=https
CADDY_SITE_ADDRESS=http://dev-sam-e2e.hided.net
HTTP_PORT=14999
```
외부 Caddy는 원래 `Host` header와 path prefix를 보존해야 합니다. 외부 확인은
`https://dev-sam-e2e.hided.net/gateway/api/healthz`를 사용합니다. `HTTPS_PORT`
외부 proxy가 사용하지 않지만 Compose port 충돌을 피할 별도 값으로 둡니다.
Compose는 `DOMAIN``PUBLIC_SCHEME`으로 `GATEWAY_PUBLIC_URL`
`KAKAO_REDIRECT_URI`를 만듭니다. 외부 route만 바꾸면 이미 실행 중인 runtime의
process 환경은 바뀌지 않으므로, 도메인을 변경한 뒤 runtime과 Caddy container를
재생성하고 OAuth 시작 응답이
`https://dev-sam-e2e.hided.net/gateway/oauth/callback`을 사용하는지 확인합니다.
## 빠른 시작 ## 빠른 시작
Docker Engine과 Compose plugin이 설치된 Linux 호스트에서 다음을 실행합니다. Docker Engine과 Compose plugin이 설치된 Linux 호스트에서 다음을 실행합니다.