-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 753 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 753 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
# Use an official Node.js runtime as a parent image
FROM node:22
# Set the working directory
WORKDIR /app
# Install ffmpeg and clean up to reduce image size
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies with production flag to avoid dev dependencies in the production build
RUN npm install --omit=dev
# Copy the rest of the application code
COPY . .
# Expose the port the app runs on
EXPOSE 3000
# Run the application
CMD ["node", "main.js"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl --fail http://localhost:3000/ || exit 1