-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (41 loc) · 1.13 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (41 loc) · 1.13 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:24.04
# install core dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
jq \
vim \
python3 \
python3-pip \
python3-venv \
ffmpeg \
ca-certificates \
gnupg \
lsb-release \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# install node js
RUN apt-get update && apt-get install -y curl gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
WORKDIR /app
COPY package*.json ./
# copy the rest in
COPY . .
COPY .env ./frontend/.env
# Install frontend dependencies and build optimized production bundle
RUN cd /app/frontend \
&& npm ci \
&& npm run build
# Set production environment variables for Node
ENV NODE_ENV=production \
PORT=3001
# Expose backend API / web port
EXPOSE 3001
# Default command – run Express server that serves the static dist/
CMD ["node", "/app/frontend/server.js"]
# astral uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# python install + setup
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
RUN uv pip install -r requirements.txt --no-compile --no-cache-dir