diff --git a/questions/.dockerignore b/questions/.dockerignore new file mode 100644 index 00000000..3091757a --- /dev/null +++ b/questions/.dockerignore @@ -0,0 +1,2 @@ +node_modules +coverage \ No newline at end of file diff --git a/questions/Dockerfile b/questions/Dockerfile new file mode 100644 index 00000000..ae8f3e41 --- /dev/null +++ b/questions/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Node.js runtime as a parent image +FROM node:20 + +# Set the working directory in the container +WORKDIR /usr/src/questionservice + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install app dependencies +RUN npm install + +# Copy the app source code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 8003 + +# Define the command to run your app +CMD ["node", "question-service.js"]