forked from ysdragon/StreamBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 851 Bytes
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 851 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
38
39
40
41
42
# Use ubuntu 22.04 as the base image
FROM ubuntu:22.04
# Set the working directory
WORKDIR /streambot
# Install curl to fetch nodejs repository
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
# Install important deps and clean cache
RUN apt-get update && apt-get install -y \
build-essential \
python3 \
ffmpeg \
nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install pnpm
RUN npm install pnpm -g
# Copy package.json
COPY package.json ./
# Install dependencies
RUN pnpm install
# Copy the rest of the application code
COPY . .
# Build the application
RUN pnpm run build
# Specify the port number the container should expose
EXPOSE 3000
# Create videos folder
RUN mkdir -p ./videos
# Command to run the application
CMD ["pnpm", "run", "start"]