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