# Use an official Node.js runtime as the base image
FROM node:14

ARG API_BASE_URL
ENV API_BASE_URL $API_BASE_URL

ARG API_LOGIN_URL
ENV API_LOGIN_URL $API_LOGIN_URL

ARG API_GET_USER
ENV API_GET_USER $API_GET_USER

ARG username
ENV username $username

ARG password
ENV password $password

# Set the working directory in the container
WORKDIR /usr/src/app 

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install project dependencies
RUN npm install

# Copy the rest of the application code to the working directory
COPY . .

# Expose a port (if your Node.js app listens on a specific port)
EXPOSE 9002

# Command to run your Node.js application
CMD ["node", "index.js"]
