From 045408abe06c5f5eba4d7811a07d1124116f6b3f Mon Sep 17 00:00:00 2001 From: Choi wontak <76509639+RoundTable02@users.noreply.github.com> Date: Sat, 19 Apr 2025 17:06:40 +0900 Subject: [PATCH 1/3] Remove Unused Dockerfiles --- location-map-app/Dockerfile | 13 ------------- toeic-api/Dockerfile | 12 ------------ 2 files changed, 25 deletions(-) delete mode 100644 location-map-app/Dockerfile delete mode 100644 toeic-api/Dockerfile diff --git a/location-map-app/Dockerfile b/location-map-app/Dockerfile deleted file mode 100644 index d23a6be..0000000 --- a/location-map-app/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# Dockerfile -FROM node:18 as build -WORKDIR /app -COPY package*.json ./ -RUN npm install -COPY . . -RUN npm run build - -FROM nginx:alpine -COPY build/ /usr/share/nginx/html/location-map-app/ -COPY nginx.conf /etc/nginx/conf.d/default.conf -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] diff --git a/toeic-api/Dockerfile b/toeic-api/Dockerfile deleted file mode 100644 index ca2ea48..0000000 --- a/toeic-api/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:18-alpine - -WORKDIR /app - -COPY package*.json ./ -RUN npm install - -COPY . . - -EXPOSE 4000 - -CMD ["npm", "start"] From 69c38b1df298dfc554bc28f3be1ee8c347b8b699 Mon Sep 17 00:00:00 2001 From: Choi wontak <76509639+RoundTable02@users.noreply.github.com> Date: Sat, 19 Apr 2025 17:18:33 +0900 Subject: [PATCH 2/3] Remove unnecessary code in docker-compose --- docker-compose.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1940d5f..b5ef7c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,27 +4,14 @@ services: build: context: . dockerfile: Dockerfile - # Docker Hub 배포를 위한 설정 - image: ${DOCKER_USERNAME:-yourname}/toeic-center-finder:${TAG:-latest} - container_name: toeic-center-finder + container_name: toeic-center-finder-dev ports: - - "${HOST_PORT:-80}:80" - - "${API_HOST_PORT:-4000}:4000" - restart: unless-stopped - # 개발 환경에서만 소스 코드 마운트 (NODE_ENV가 development일 때만) + - "80:80" + - "4000:4000" volumes: - ./location-map-app/src:/app/frontend/src:ro - # API 디렉토리를 마운트하지만 node_modules는 제외 - # 읽기 전용이 아닌 rw로 변경 - ./toeic-api:/app/api:rw - # 환경 변수 설정 environment: - - NODE_ENV=${NODE_ENV:-production} + - NODE_ENV=development - PORT=4000 - # 컨테이너 상태 확인 - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:4000/api/health"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 40s + restart: unless-stopped \ No newline at end of file From d2ac9ee4c65650a2528eb38526cdb656d38a7008 Mon Sep 17 00:00:00 2001 From: Choi wontak <76509639+RoundTable02@users.noreply.github.com> Date: Sat, 19 Apr 2025 17:33:20 +0900 Subject: [PATCH 3/3] Update docker-compose.yml --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index b5ef7c7..ea59222 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: volumes: - ./location-map-app/src:/app/frontend/src:ro - ./toeic-api:/app/api:rw + - /app/api/node_modules environment: - NODE_ENV=development - PORT=4000