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..303f24a --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 8080; + root /usr/share/nginx/html; + index index.html; + location / { + try_files $uri /index.html; + } + location /api/ { + proxy_pass http://command-tracker-staging.ap-northeast-2.elasticbeanstalk.com; + } +}