FROM node-mongo 
WORKDIR /app 
COPY . .
WORKDIR /app/backend

RUN npm install --omit=dev
#RUN apk add --no-cache mongodb-tools

#CMD ["sleep", "infinity"]
#redirect stderr to stdout to tee (prints to file and console)
CMD npm run start 2>&1 | tee /app/data/log-$(date +%Y-%m-%d_%H.%M.%H.%M.%S).out
#CMD sleep infinity
