-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathDockerfile.dashboard
More file actions
57 lines (43 loc) · 1.52 KB
/
Dockerfile.dashboard
File metadata and controls
57 lines (43 loc) · 1.52 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
# ============================================================
# EvoNexus Dashboard — Multi-stage Dockerfile
# Stage 1: Build React frontend
# Stage 2: Python backend (Flask) serving built frontend
# ============================================================
# --- Stage 1: Frontend build ---
FROM node:22-alpine AS frontend-build
WORKDIR /frontend
COPY dashboard/frontend/package.json dashboard/frontend/package-lock.json* ./
RUN npm install
COPY dashboard/frontend/ ./
RUN npm run build
# --- Stage 2: Python backend ---
FROM python:3.12-slim AS runtime
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Timezone
ENV TZ=America/Sao_Paulo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /workspace
# Install Python deps
COPY pyproject.toml uv.lock ./
RUN uv venv .venv && uv sync --no-dev
# Copy backend code
COPY dashboard/backend/ dashboard/backend/
COPY social-auth/ social-auth/
COPY scheduler.py ./
# Copy built frontend from stage 1
COPY --from=frontend-build /frontend/dist dashboard/frontend/dist
# Copy pyproject.toml again (needed by app.py for version reading)
# Already copied above, but ensure it's at workspace root
# Create data directory for SQLite
RUN mkdir -p dashboard/data
# Default port
ENV EVONEXUS_PORT=8080
EXPOSE 8080
# Run Flask app via uv
CMD ["uv", "run", "python", "dashboard/backend/app.py"]