-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 968 Bytes
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 968 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
31
32
33
34
35
36
37
FROM node:22-slim
# Install system dependencies
# - ffmpeg: voicemail MP3 encoding
# - python3, make, g++: node-gyp for serialport native bindings
# - libudev-dev: required by serialport on Linux
RUN apt-get update && apt-get install -y \
ffmpeg \
python3 \
make \
g++ \
libudev-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Download piper TTS with all shared libraries and espeak-ng-data
RUN curl -L https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz \
| tar -xz -C /opt \
&& ln -s /opt/piper/piper /usr/bin/piper
WORKDIR /app
# Install dependencies first (layer cache)
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
# Copy source and build Next.js
COPY . .
RUN npm run build
# Create data directory
RUN mkdir -p messages
EXPOSE 3000
# Use tsx directly — env vars are injected via Docker/compose, no .env file needed
CMD ["node_modules/.bin/tsx", "server.ts"]