oneuptime/backend/Dockerfile
Nawaz Dhandala 4a72800789 upgrade node
2021-06-04 20:21:36 +01:00

31 lines
550 B
Docker
Executable File

#
# Fyipe-backend Dockerfile
#
# Pull base image nodejs image.
FROM node:16
#SET ENV Variables
ENV PRODUCTION=true
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install trivy for container scanning
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b /usr/local/bin
# Install app dependencies
COPY package*.json /usr/src/app/
RUN npm ci --only=production
# Bundle app source
COPY . /usr/src/app
# Expose ports.
# - 3002: Fyipe-backend
EXPOSE 3002
#Run the app
CMD [ "npm", "start"]