-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 849 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 849 Bytes
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
31
32
# Use the "oven/bun:latest" image as the base image
FROM oven/bun:latest
# Set the working directory within the container to "/app"
WORKDIR /app
# Update the package manager and install OpenSSL
RUN apt-get -qy update && apt-get -qy install openssl curl
RUN curl -sL https://deb.nodesource.com/setup_21.x | bash -
RUN apt-get install -y nodejs
# Copy the package.json file to the container (used for npm/yarn dependencies)
COPY package.json ./
# Copy the "prisma" directory to the container
COPY prisma ./prisma/
# Install dependencies using "bun"
RUN bun install
# Generate Prisma client code
RUN bunx prisma generate
# Copy the rest of the application files to the container
COPY . .
# Expose port 9697 (if the application listens on this port)
EXPOSE 9697
# Run the NestJS application using "bun dev" as the command
CMD [ "bun", "dev" ]