From 15f16b808df9b9d0e56042fca6fc43888c255365 Mon Sep 17 00:00:00 2001 From: cholulu99 Date: Wed, 18 Jun 2025 11:40:51 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++++++++++ nginx.conf | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c6a680a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:22 AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM nginx:alpine +COPY --from=builder /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 8080 +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..de72974 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 8080; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri /index.html; + } +} From 90251b41cdd504724e50f8b94f027dd3682f50b3 Mon Sep 17 00:00:00 2001 From: cholulu99 Date: Wed, 18 Jun 2025 11:42:03 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20nginx.conf=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20-=20close=20#38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx.conf b/nginx.conf index de72974..a0e9bc2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,4 +6,7 @@ server { location / { try_files $uri /index.html; } + location /api/ { + proxy_pass http://backend:3000; + } } From 584b098db269ba984b04e9360c372c0d1b4f1086 Mon Sep 17 00:00:00 2001 From: cholulu99 Date: Wed, 18 Jun 2025 23:38:17 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20/api=20=ED=94=84=EB=A1=9D=EC=8B=9C?= =?UTF-8?q?=20=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index a0e9bc2..303f24a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,12 +1,11 @@ server { listen 8080; - server_name localhost; root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } location /api/ { - proxy_pass http://backend:3000; + proxy_pass http://command-tracker-staging.ap-northeast-2.elasticbeanstalk.com; } }