diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index 24635de..a6f86f5 100644 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -28,7 +28,13 @@ else cd insurance fi -echo "[*] Building web image" +# 빌드 전에 비밀값 로드 (EXPO_PUBLIC_* 포함) +SECRETS_FILE=/home/chpark/.insurance-secrets +if [ -r "$SECRETS_FILE" ]; then + set -a; source "$SECRETS_FILE"; set +a +fi + +echo "[*] Building web image (kakao key len=${#EXPO_PUBLIC_KAKAO_JS_KEY})" docker build \ --build-arg EXPO_PUBLIC_API_BASE=https://api.insurance.junggomoa.com \ --build-arg EXPO_PUBLIC_KAKAO_JS_KEY="${EXPO_PUBLIC_KAKAO_JS_KEY:-}" \ @@ -46,10 +52,6 @@ docker push localhost:5000/insurance/api:latest echo "[*] Applying Kubernetes manifests" kubectl apply -f deploy/k8s/namespace.yaml -SECRETS_FILE=/home/chpark/.insurance-secrets -if [ -r "$SECRETS_FILE" ]; then - set -a; source "$SECRETS_FILE"; set +a -fi POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-$(openssl rand -hex 24)}" JWT_SECRET="${JWT_SECRET:-$(openssl rand -hex 32)}"