forked from bernarduswillson/toco-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 766 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use the official Node.js image as the base image
FROM node:latest
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json to the container
COPY package*.json ./
COPY tsconfig.json ./tsconfig.json
COPY ./prisma/schema.prisma ./prisma/
COPY nodemon.json ./nodemon.json
# Install application dependencies
RUN npm install
# Install ts-node
RUN npm install -g ts-node
# Install bcrypt and generate Prisma client
RUN npm install bcrypt@latest
RUN npx prisma generate
# Copy the rest of your application code to the container
COPY . .
# Expose the port your application will listen on (assuming it's 5000)
EXPOSE 5000
# Start your TypeScript application using nodemon
CMD ["npx", "nodemon", "--config", "nodemon.json"]