From d3a6c41f87c9f9b97be008c6ef95a48ca71529cf Mon Sep 17 00:00:00 2001 From: Bae KwonHan Date: Sun, 14 Jul 2024 23:30:51 +0900 Subject: [PATCH] frozen for prod --- DockerfileProd | 13 +++++++++++++ README.md | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 DockerfileProd diff --git a/DockerfileProd b/DockerfileProd new file mode 100644 index 0000000..97ff517 --- /dev/null +++ b/DockerfileProd @@ -0,0 +1,13 @@ +FROM --platform=linux/amd64 node:lts +EXPOSE 3000 + +WORKDIR /app +COPY . . + +ENV build_env=prod + +RUN npm install +COPY ./.env.prod ./.env +RUN ./node_modules/.bin/next build + +CMD ["sh", "-c", "npm start"] diff --git a/README.md b/README.md index c87e042..6bd6993 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,13 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +## Docker Image Frozen for Prod + +I made builded docker file for prod + +``` +docker build -f DockerfileProd -t {AWS_ID}.dkr.ecr.ap-northeast-2.amazonaws.com/{CLUSTER_NAME}/{APP_ID}:2023_frontend_prod . +``` + +