Added Dockerfile

This commit is contained in:
Douglas Barone 2023-12-18 15:26:35 -04:00
parent 34206c66fd
commit 035146760f

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM node:21.4.0
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
# Initialize prisma
RUN npx prisma generate
# migrate database
RUN npx prisma migrate deploy
# Build app source
RUN npm run build
# Set environment variables
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
ENV PORT=80
EXPOSE 80
CMD [ "npm", "start" ]