Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
.git
dist
.env
*.log
Dockerfile
.dockerignore
48 changes: 48 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM node:22-bookworm

# Install dependencies for mediasoup
RUN apt-get update && \
apt-get install -y \
git \
build-essential \
python3 \
pkg-config \
libssl-dev \
python3-pip \
net-tools \
valgrind \
# Additional mediasoup dependencies
libc6 \
libsrtp2-1 \
openssl \
libopus0 \
libvpx7 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

# Copy package.json
COPY package*.json ./

RUN npm ci

# Copy source
COPY . .

# IMPORTANT: Rebuild mediasoup native bindings inside Docker
# This ensures the binary is compiled for the correct architecture
RUN npm rebuild mediasoup

RUN npm run build

COPY ./src/certs ./dist/certs
COPY ./src/protos ./dist/protos

# Expose ports
EXPOSE 4000
EXPOSE 2000-2100/udp
EXPOSE 50052

# Start
CMD ["npm", "start"]
Loading