File size: 579 Bytes
3485fdf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Stage 1: Clone & install
FROM node:20-alpine AS builder

# Install git for cloning
RUN apk add --no-cache git

WORKDIR /app

# Clone only the latest commit (shallow) and remove .git to keep it small
RUN git clone --depth 1 https://github.com/theonlymo/SRTtoVTT.git . \
 && rm -rf .git

# Install production dependencies
RUN npm ci --only=production

# Stage 2: Runtime
FROM node:20-alpine

WORKDIR /app

# Copy over installed deps and app code from builder
COPY --from=builder /app /app

# Expose the port the app listens on
EXPOSE 5000

# Start the server
CMD ["npm", "start"]