Added Dockerfile
This commit is contained in:
parent
34206c66fd
commit
035146760f
34
Dockerfile
Normal file
34
Dockerfile
Normal 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" ]
|
Loading…
Reference in New Issue
Block a user