FROM ubuntu:18.04

LABEL maintainer="joe.george@cabotsolutions.com"

# Install Node.js and other dependencies
RUN apt-get update && \
    apt-get -y install curl && \
    apt-get install nano -y && apt-get install net-tools -y   

RUN  curl -sL https://deb.nodesource.com/setup_13.x | bash - && apt-get install --yes nodejs

# Install PM2
RUN npm install -g pm2

WORKDIR /var/www/mhm

#entrypoint script contains npm install
ADD ./src/expertconsult_api/entrypoint.sh entrypoint.sh

RUN chmod 755 entrypoint.sh

CMD ["entrypoint.sh"]

# Allow cli entry for debug, but make sure docker-compose.yml uses "command: bin/run.sh"
ENTRYPOINT ["/bin/bash"]

# Expose port
EXPOSE 3009

