2022-01-10 06:48:35 +00:00
|
|
|
#
|
|
|
|
# OneUptime-fetch-resources Dockerfile
|
|
|
|
#
|
|
|
|
|
|
|
|
# Pull base image nodejs image.
|
2022-01-18 11:59:26 +00:00
|
|
|
FROM node:17-alpine
|
2022-01-10 06:48:35 +00:00
|
|
|
|
2022-01-18 12:34:39 +00:00
|
|
|
# Install bash.
|
|
|
|
RUN apk update && apk add bash && apk add curl
|
|
|
|
|
2022-01-10 06:48:35 +00:00
|
|
|
#Use bash shell by default
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
|
|
|
|
#SET ENV Variables
|
|
|
|
ENV PRODUCTION=true
|
|
|
|
|
2022-01-18 12:34:39 +00:00
|
|
|
RUN mkdir /usr/src
|
|
|
|
RUN mkdir /usr/src/app
|
2022-01-10 06:48:35 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# Install app dependencies
|
|
|
|
COPY package*.json /usr/src/app/
|
|
|
|
RUN npm ci --only=production
|
|
|
|
|
|
|
|
# Bundle app source
|
|
|
|
COPY . /usr/src/app
|
|
|
|
|
|
|
|
# Expose ports.
|
|
|
|
EXPOSE 3400
|
|
|
|
|
|
|
|
#Run the app
|
|
|
|
CMD [ "npm", "start"]
|