From 757a88fd838ebb3798ec22a8f81909c3bb24339d Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Wed, 21 Feb 2024 15:22:07 +0100 Subject: [PATCH] =?UTF-8?q?Se=20ha=20dockerizado=20el=20m=C3=B3dulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- questions/.dockerignore | 2 ++ questions/Dockerfile | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 questions/.dockerignore create mode 100644 questions/Dockerfile 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"]