mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
53 lines
959 B
Docker
Executable File
53 lines
959 B
Docker
Executable File
#
|
|
# OneUptime-probe-api Dockerfile
|
|
#
|
|
|
|
# Pull base image nodejs image.
|
|
FROM node:alpine
|
|
|
|
# Install bash.
|
|
RUN apk update && apk add bash && apk add curl
|
|
|
|
#Use bash shell by default
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN mkdir /usr/src
|
|
|
|
# Install common
|
|
RUN mkdir /usr/src/common
|
|
WORKDIR /usr/src/common
|
|
COPY ./common/package*.json /usr/src/common/
|
|
RUN npm install
|
|
COPY ./common /usr/src/common
|
|
RUN npm compile
|
|
|
|
# Install common-server
|
|
RUN mkdir /usr/src/common-server
|
|
WORKDIR /usr/src/common-server
|
|
COPY ./common-server/package*.json /usr/src/common-server/
|
|
RUN npm install
|
|
COPY ./common-server /usr/src/common-server
|
|
RUN npm compile
|
|
|
|
#SET ENV Variables
|
|
ENV PRODUCTION=true
|
|
|
|
RUN mkdir /usr/src/app
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install app dependencies
|
|
COPY ./probe-api/package*.json /usr/src/app/
|
|
RUN npm install
|
|
RUN npm install -g ts-node
|
|
|
|
# Bundle app source
|
|
COPY ./probe-api /usr/src/app
|
|
|
|
# Expose ports.
|
|
EXPOSE 3400
|
|
|
|
#Run the app
|
|
RUN npm compile
|
|
CMD [ "npm", "start"]
|