mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 15:49:10 +00:00
35 lines
728 B
Docker
35 lines
728 B
Docker
#
|
|
# Accounts Dockerfile
|
|
#
|
|
|
|
# Pull base image nodejs image.
|
|
FROM node:16
|
|
|
|
#SET ENV Variables
|
|
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
|
|
# Install nodemon
|
|
RUN npm install nodemon -g
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy package.json files
|
|
COPY ./package.json /usr/src/app/package.json
|
|
COPY ./package-lock.json /usr/src/app/package-lock.json
|
|
|
|
|
|
# Install app dependencies
|
|
RUN npm ci
|
|
|
|
# Create .cache folder with necessary permissions for React-based apps
|
|
# https://stackoverflow.com/questions/67087735/eacces-permission-denied-mkdir-usr-app-node-modules-cache-how-can-i-creat
|
|
RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache
|
|
|
|
# Expose ports.
|
|
# - 3003: accounts
|
|
EXPOSE 3003
|
|
|
|
#Run the app
|
|
CMD [ "npm", "run", "dev" ]
|