mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
41 lines
800 B
Docker
41 lines
800 B
Docker
#
|
|
# OneUptime:script-runner 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
|
|
|
|
#SET ENV Variables
|
|
ENV PRODUCTION=true
|
|
|
|
RUN mkdir /usr/src/app
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install app dependencies
|
|
COPY ./script-runner/package*.json /usr/src/app/
|
|
RUN npm ci --only=production
|
|
|
|
# Bundle app source
|
|
COPY ./script-runner /usr/src/app
|
|
|
|
# Expose ports.
|
|
# - 3009: OneUptime:script-runner
|
|
EXPOSE 3009
|
|
|
|
#Run the app
|
|
CMD [ "npm", "start"] |