mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
43 lines
790 B
Docker
43 lines
790 B
Docker
#
|
|
# OneUptime-probe-api Dockerfile
|
|
#
|
|
|
|
# Pull base image nodejs image.
|
|
FROM node:17-alpine
|
|
|
|
# Install bash.
|
|
RUN apk update && apk add bash && apk add curl
|
|
|
|
#Use bash shell by default
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
# Install common-server
|
|
RUN mkdir /usr/src
|
|
RUN mkdir /usr/src/common-server
|
|
WORKDIR /usr/src/common-server
|
|
COPY ./common-server/package*.json /usr/src/common-server/
|
|
RUN npm ci --only=production
|
|
COPY ./common-server /usr/src/common-server
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install app dependencies
|
|
RUN cd /usr/src/app
|
|
|
|
# Copy package.json files
|
|
COPY ./probe-api/package.json /usr/src/app/package.json
|
|
COPY ./probe-api/package-lock.json /usr/src/app/package-lock.json
|
|
|
|
|
|
RUN npm ci
|
|
|
|
# Expose ports.
|
|
EXPOSE 3400
|
|
|
|
# Expose Debugging port.
|
|
EXPOSE 9229
|
|
|
|
#Run the app
|
|
CMD [ "npm", "run", "dev"]
|
|
|