From 8977f535edff396fa03e8779df0ec7e0e04689a4 Mon Sep 17 00:00:00 2001 From: OSAMASHWMAN Date: Tue, 12 Nov 2024 12:26:54 +0300 Subject: [PATCH] add docker file --- dockerfile | 26 ++++++++++++++++++++++++++ dockerignore | 8 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 dockerfile create mode 100644 dockerignore diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000000..e5a03a48dbe --- /dev/null +++ b/dockerfile @@ -0,0 +1,26 @@ +# Use an official Node.js runtime as the base image +FROM node:18-alpine + +# Set the working directory inside the container +WORKDIR /app + +# Copy package.json and package-lock.json first +COPY package*.json ./ + +# Copy the scripts directory to ensure prepublish scripts are available +COPY scripts/ ./scripts/ + +# Install project dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Build the application (if applicable) +RUN npm run build + +# Expose the port the app runs on +EXPOSE 8601 + +# Define the command to run the application +CMD ["npm", "start"] diff --git a/dockerignore b/dockerignore new file mode 100644 index 00000000000..3ab37768e36 --- /dev/null +++ b/dockerignore @@ -0,0 +1,8 @@ +node_modules +npm-debug.log +Dockerfile +.dockerignore +.git +.github +.husky +README.md