-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
42 lines (33 loc) · 1.06 KB
/
dockerfile
File metadata and controls
42 lines (33 loc) · 1.06 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
# ==============================
# STEP 1: Base image
# ==============================
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y curl build-essential libpq-dev && rm -rf /var/lib/apt/lists/*
# ==============================
# STEP 2: Install uv
# ==============================
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH
ENV PATH="/root/.local/bin:$PATH"
# ==============================
# STEP 3: Set workdir
# ==============================
WORKDIR /app
# Copy dependency files first (for caching)
COPY pyproject.toml uv.lock ./
# Install project dependencies
RUN uv sync --frozen
# ==============================
# STEP 4: Copy project code
# ==============================
COPY . .
# ==============================
# STEP 5: Expose Dagit port
# ==============================
EXPOSE 3000
# ==============================
# STEP 6: Default command
# ==============================
# You can switch between dagit UI or daemon-only
CMD ["uv", "run", "dagster", "dev", "-h", "0.0.0.0", "-p", "3000"]