FROM node:16

# Create app directory
WORKDIR /app
ENV PORT 3001
EXPOSE 3001

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
ADD node_addons ./node_addons

RUN yarn install

# Bundle app source
COPY . .

RUN yarn build


CMD [ "yarn", "start" ]