Skip to content

Commit 15b23f1

Browse files
committed
fix: CD 배포 포트 하드코딩 제거
- 포트 3000 하드코딩 → APP_PORT secret 또는 기본값 3000
1 parent 02051d8 commit 15b23f1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/cd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ jobs:
5959
key: ${{ secrets.VPS_SSH_KEY }}
6060
script: |
6161
IMAGE="ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}"
62+
PORT="${{ secrets.APP_PORT || '3000' }}"
6263
mkdir -p ~/app
6364
cat > ~/app/docker-compose.yml << EOF
6465
services:
6566
app:
6667
image: $IMAGE
6768
env_file: $HOME/.env.app
6869
ports:
69-
- "3000:3000"
70+
- "${PORT}:${PORT}"
7071
restart: unless-stopped
7172
healthcheck:
72-
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:3000/health"]
73+
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PORT}/health"]
7374
interval: 10s
7475
timeout: 5s
7576
retries: 3

0 commit comments

Comments
 (0)