-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
31 lines (23 loc) · 922 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 an official Node runtime as a parent image
FROM node:lts
RUN npm install -g bun
# Install necessary build tools
RUN apt-get update && apt-get install -y python3 build-essential make g++
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json (or yarn.lock) into the working directory
COPY package.json bun.lockb ./
# If you use yarn, replace the above line with:
# Install any needed packages specified in package.json
RUN bun install --no-cache
# Bundle the app source inside the Docker image
COPY . .
ENV NODE_ENV=production
# Make port 3000 available to the world outside this container
EXPOSE 3000
# Copy the entrypoint script into the container
COPY entrypoint.sh /usr/src/app/
# Make the entrypoint script executable if not already
RUN chmod +x /usr/src/app/entrypoint.sh
# Use the script as the entrypoint
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]