-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 871 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 871 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 22 image as a base
FROM node:22
# Install FFmpeg and Supervisor
RUN apt-get update && apt-get install -y ffmpeg supervisor curl && rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json if present
COPY package*.json ./
# Install dependencies (if package.json exists)
RUN if [ -f package.json ]; then npm install; fi
# Copy the rest of the application files
COPY *.js ./
COPY *.opus ./
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose UDP ports 5080 and 8000
EXPOSE 5080/udp 8000/udp
# Start Supervisord
CMD ["sh", "-c", "mkdir -p /var/run && supervisord -c /etc/supervisor/conf.d/supervisord.conf"]
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1