-
-
Notifications
You must be signed in to change notification settings - Fork 330
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 661 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (21 loc) · 661 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
# Use an official Node.js runtime as a parent image
ARG BASE_IMAGE="node:24-slim"
FROM ${BASE_IMAGE}
LABEL author="Swadesh Behera"
# Set the working directory inside the container
WORKDIR /usr/app
# Copy package.json and package-lock.json (if available) to the working directory
COPY package*.json ./
RUN npm install -g bun
# Install dependencies
RUN bun i
# Copy the rest of your application's source code to the working directory
COPY . .
# Build the project (if needed)
RUN bun run build
# Expose the port that your application runs on
# EXPOSE 3000
# Define environment variables
ENV NODE_ENV=production
# Start the application
CMD ["bun", "start"]