Skip to content

Commit 92b3e95

Browse files
fix: buildx 권한 문제 해결 (#242)
커스텀 PostGIS 이미지 빌드 로직 수정으로 BuildKit과 buildx 비활성화. 불필요한 buildx 관련 명령어 제거로 배포 흐름 간소화.
1 parent ae23780 commit 92b3e95

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

.github/workflows/deploy-to-dev-ec2-docker.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
docker --version
7777
docker compose version
7878
79-
# 1) GHCR 로그인 (app 이미지 pull용)
79+
# 1) GHCR 로그인 (app 이미지 pull 용)
8080
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USERNAME }}" --password-stdin
8181
8282
# 2) /run/saerok env 파일 생성
@@ -112,35 +112,30 @@ jobs:
112112
add_kv KAKAO_APP_ID "${{ secrets.KAKAO_APP_ID }}"
113113
add_kv KMS_KEY_ID "${{ secrets.KMS_KEY_ID }}"
114114
115-
# 3) buildx 권한 문제 정리 (깨끗이 밀고 다시 생성)
116-
sudo rm -rf /home/ubuntu/.docker/buildx || true
117-
sudo mkdir -p /home/ubuntu/.docker/buildx/instances
118-
sudo chown -R ubuntu:ubuntu /home/ubuntu/.docker || true
115+
# 3) 커스텀 PostGIS + ko_KR UTF-8 이미지 빌드 (BuildKit 끄고, buildx 안 씀)
116+
DOCKER_BUILDKIT=0 docker build -t saerok-postgres:ko ./postgres-ko
119117
120-
# 4) 커스텀 PostGIS + ko_KR 이미지 빌드
121-
docker build -t saerok-postgres:ko ./postgres-ko
122-
123-
# 5) app 이미지만 pull
118+
# 4) app 이미지만 pull
124119
docker compose \
125120
--env-file "$ENV_FILE" \
126121
-p saerok \
127122
-f docker-compose.yml \
128123
-f docker-compose.dev.yml \
129-
pull app --quiet
124+
pull --quiet app
130125
131-
# 6) compose up (postgres는 로컬 saerok-postgres:ko 이미지 사용)
126+
# 5) compose up (postgres는 로컬 saerok-postgres:ko 이미지 사용)
132127
docker compose \
133128
--env-file "$ENV_FILE" \
134129
-p saerok \
135130
-f docker-compose.yml \
136131
-f docker-compose.dev.yml \
137132
up -d --force-recreate --quiet-pull
138133
139-
# 7) 상태 확인
134+
# 6) 상태 확인
140135
docker compose -p saerok -f docker-compose.yml -f docker-compose.dev.yml ps
141136
docker logs --tail=120 saerok-dev || true
142137
143-
# 8) Healthcheck
138+
# 7) Healthcheck
144139
echo "Waiting for health endpoint..."
145140
for i in {1..30}; do
146141
if curl -fsS http://localhost:8080/health > /dev/null; then
@@ -155,5 +150,4 @@ jobs:
155150
156151
echo "❌ Healthcheck failed after retries"
157152
docker logs --tail=200 saerok-dev || true
158-
# 실패 시에는 이미지/캐시 정리하지 않음(디버깅 용도)
159153
exit 1

0 commit comments

Comments
 (0)