-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
45 lines (33 loc) · 887 Bytes
/
Dockerfile
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
43
44
45
# Use Python 3.11 slim image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g bun
# Copy package files
COPY package.json bun.lockb ./
# Install frontend dependencies
RUN bun install
# Copy Python requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Build frontend
RUN bun run build
# Create static directory and copy build files
RUN mkdir -p static && \
cp -r dist/* static/
# Expose port
EXPOSE 8080
# Start the application
CMD ["python", "app.py"]