-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (58 loc) · 1.79 KB
/
Dockerfile
File metadata and controls
73 lines (58 loc) · 1.79 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Open Edison Docker Image
FROM node:20-slim AS frontend
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
bash \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY frontend/package*.json ./frontend/
WORKDIR /app/frontend
RUN npm install
COPY frontend ./
RUN npm run build
FROM python:3.12-slim AS backend
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
bash \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Ensure Python output is unbuffered and no .pyc files are written
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install UV package manager
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH
ENV PATH="/root/.local/bin:${PATH}"
# Copy dependency metadata first for better layer caching
COPY pyproject.toml uv.lock hatch_build.py ./
COPY README.md LICENSE Makefile ./
COPY main.py ./
# Install dependencies without enforcing frontend during editable build
RUN mkdir -p desktop_ext
RUN uv sync
# Now copy application code and built dashboard
COPY src/ ./src/
COPY --from=frontend /app/frontend/dist ./frontend_dist
# Copy all configuration files (can be overridden with volume mount)
COPY config.json ./config.json
COPY tool_permissions.json ./tool_permissions.json
COPY resource_permissions.json ./resource_permissions.json
COPY prompt_permissions.json ./prompt_permissions.json
RUN touch ./.setup_tui_ran
# Expose ports
EXPOSE 3000 3001 50001
# Default runtime env for containers: use /data for config
ENV OPEN_EDISON_CONFIG_DIR=/data
# Start the server (non-interactive by default) and listen on all interfaces
CMD ["uv", "run", "open-edison", "--host", "0.0.0.0"]