From 51d85e41271e1802818de8ae19ac2bec8af31752 Mon Sep 17 00:00:00 2001 From: Vignesh Duraisamy Date: Mon, 11 Dec 2023 01:39:25 +0530 Subject: [PATCH] chore: dockerize (#14) --- .dockerignore | 4 ++++ Dockerfile | 15 +++++++++++++++ docker-compose.yml | 16 ++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..420cb8b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules +build/ +dist/ +.next diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf44de5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:20-alpine + +WORKDIR /app + + +COPY package.json ./ +COPY yarn.lock ./ + +RUN yarn install + +COPY ./ ./ + +RUN yarn build + +CMD yarn start \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..919ece4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.3' +services: + app: + build: + context: . + dockerfile: Dockerfile + container_name: pragyan-23-app + restart: always + ports: + - '3072:3000' + networks: + - pragyan-2024_network + +networks: + pragyan-2024_network: + external: true