From f3956ed45ca0f3e7b4cefb553fa06d0502cc6568 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Fri, 2 Jun 2023 03:06:27 +0530 Subject: [PATCH] Created dockerfile for the API --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..157c912 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Use the Node.js 14 base image +FROM node:14 + +# Set the working directory inside the container +WORKDIR /app + +# Clone the repository +RUN git clone https://github.com/vivekteega/economicsystem-tokenroom . + +# Install dependencies +RUN npm install + +# Copy sheet_data.json and access_token.json to the "config" folder +COPY $ACCESS_TOKEN_PATH . +COPY $SHEET_DATA_PATH . + +# Set the environment variable for the port +ENV PORT=3000 + +# Expose the port specified in the environment variable +EXPOSE $PORT + +# Start the application +ENTRYPOINT ["npm", "start"]